From: Paul Brossier Date: Wed, 30 Nov 2016 16:17:24 +0000 (+0100) Subject: src/io/source_avcodec.c: call avformat_free_context after avformat_close_input X-Git-Tag: 0.4.4~122 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=41ebc91ef217ba59d67fd41ba77aace57dc2343d src/io/source_avcodec.c: call avformat_free_context after avformat_close_input --- diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index 286655ed..00bf3da6 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -502,9 +502,10 @@ uint_t aubio_source_avcodec_close(aubio_source_avcodec_t * s) { } s->avCodecCtx = NULL; if (s->avFormatCtx != NULL) { - avformat_close_input ( &(s->avFormatCtx) ); + avformat_close_input(&s->avFormatCtx); + avformat_free_context(s->avFormatCtx); + s->avFormatCtx = NULL; } - s->avFormatCtx = NULL; return AUBIO_OK; }