From 41ebc91ef217ba59d67fd41ba77aace57dc2343d Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 30 Nov 2016 17:17:24 +0100 Subject: [PATCH] src/io/source_avcodec.c: call avformat_free_context after avformat_close_input --- src/io/source_avcodec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.11.0