From: Paul Brossier Date: Fri, 17 Mar 2017 17:34:04 +0000 (+0100) Subject: src/io/source_avcodec.c: use avcodec_free_context for newer ffmpeg X-Git-Tag: 0.4.5~50 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=91fa88d3c702a0a38a3a75d842f3cecf823b25e1;p=aubio.git src/io/source_avcodec.c: use avcodec_free_context for newer ffmpeg --- diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index a17d1a32..ede096ca 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -564,7 +564,11 @@ uint_t aubio_source_avcodec_close(aubio_source_avcodec_t * s) { } 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) {