summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodecaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/encavcodecaudio.c')
-rw-r--r--libhb/encavcodecaudio.c6
1 files changed, 3 insertions, 3 deletions
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)