[FFmpeg-cvslog] avcodec/cfhdenc: Fix leaks on allocation errors
Andreas Rheinhardt
git at videolan.org
Mon Sep 14 16:53:17 EEST 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | 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 <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> 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,
};
More information about the ffmpeg-cvslog
mailing list