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/hb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libhb/hb.c') diff --git a/libhb/hb.c b/libhb/hb.c index b973645b0..a0d1b7291 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -140,11 +140,9 @@ int hb_avcodec_open(AVCodecContext *avctx, AVCodec *codec, return ret; } -int hb_avcodec_close(AVCodecContext *avctx) +void hb_avcodec_free_context(AVCodecContext **avctx) { - int ret; - ret = avcodec_close(avctx); - return ret; + avcodec_free_context(avctx); } -- cgit v1.2.3