diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-14 01:37:07 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-14 15:11:27 +0200 |
commit | a489b6a8e398614d8f719b318bbb02db3da4510d (patch) | |
tree | 1c8143256781086e1260a670d2d414bbc1fd5944 | |
parent | 82b6f4b5563fccfbe21ea1b4e14109ce1f57ef2d (diff) | |
download | ffmpeg-a489b6a8e398614d8f719b318bbb02db3da4510d.tar.gz |
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@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | libavcodec/cfhdenc.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, }; |