[FFmpeg-cvslog] avfilter/vf_mcdeint: free the AVCodecContext struct properly

James Almer git at videolan.org
Wed Aug 30 20:36:42 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Aug 30 14:34:04 2017 -0300| [f7d4c60ac47547f69ddc96e7bed682f54436cd1a] | committer: James Almer

avfilter/vf_mcdeint: free the AVCodecContext struct properly

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7d4c60ac47547f69ddc96e7bed682f54436cd1a
---

 libavfilter/vf_mcdeint.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c
index 26387b84e7..d53322b40d 100644
--- a/libavfilter/vf_mcdeint.c
+++ b/libavfilter/vf_mcdeint.c
@@ -154,10 +154,7 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
     MCDeintContext *mcdeint = ctx->priv;
 
-    if (mcdeint->enc_ctx) {
-        avcodec_close(mcdeint->enc_ctx);
-        av_freep(&mcdeint->enc_ctx);
-    }
+    avcodec_free_context(&mcdeint->enc_ctx);
 }
 
 static int query_formats(AVFilterContext *ctx)



More information about the ffmpeg-cvslog mailing list