ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | 
Mon Sep 14 01:37:07 2020 +0200| [a489b6a8e398614d8f719b318bbb02db3da4510d] | 
committer: Andreas Rheinhardt

avcodec/cfhdenc: Fix leaks on allocation errors

The CineForm HD encoder attempts to allocate several buffers in its init
function; yet if only some of these allocations succeed, the
successfully allocated buffers leak. This is fixed by setting the
FF_CODEC_CAP_INIT_CLEANUP flag.

Reviewed-by: Paul B Mahol <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>

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

 libavcodec/cfhdenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index 776b6da235..5554baefa3 100644
--- a/libavcodec/cfhdenc.c
+++ b/libavcodec/cfhdenc.c
@@ -919,4 +919,5 @@ AVCodec ff_cfhd_encoder = {
                           AV_PIX_FMT_GBRAP12,
                           AV_PIX_FMT_NONE
                         },
+    .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
 };

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to