shithub: aubio

Download patch

ref: 91fa88d3c702a0a38a3a75d842f3cecf823b25e1
parent: bdf7cafc88738726bebdda150ab34159ba58cec2
author: Paul Brossier <piem@piem.org>
date: Fri Mar 17 14:34:04 EDT 2017

src/io/source_avcodec.c: use avcodec_free_context for newer ffmpeg

--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -564,7 +564,11 @@
   }
   s->avr = NULL;
   if (s->avCodecCtx != NULL) {
+#ifndef HAVE_AUBIO_LIBAVCODEC_DEPRECATED
+    avcodec_free_context( &s->avCodecCtx );
+#else
     avcodec_close ( s->avCodecCtx );
+#endif
   }
   s->avCodecCtx = NULL;
   if (s->avFormatCtx != NULL) {