From 5a52b9265c71296f676be899f7f8ef893e12f7bb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 12 Jan 2018 01:53:01 +0100 Subject: FFMPEG: Use avcodec_free_context(..) instead of deprecated leaking avcodec_close(..) Hence rename hb_avcodec_close -> hb_avcodec_free_context and pass the required ptr-ptr. avcodec_free_context(..) ensures releasing of all resources attached to the context. --- libhb/encavcodecaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libhb/encavcodecaudio.c') diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c index 79f775a9d..d3c1fe5d1 100644 --- a/libhb/encavcodecaudio.c +++ b/libhb/encavcodecaudio.c @@ -308,10 +308,10 @@ static void encavcodecaClose(hb_work_object_t * w) { Finalize(w); hb_deep_log(2, "encavcodecaudio: closing libavcodec"); - if (pv->context->codec != NULL) + if (pv->context->codec != NULL) { avcodec_flush_buffers(pv->context); - hb_avcodec_close(pv->context); - av_free( pv->context ); + } + hb_avcodec_free_context(&pv->context); } if (pv->output_buf != NULL) -- cgit v1.2.3