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>
This commit is contained in:
Andreas Rheinhardt 2020-09-14 01:37:07 +02:00
parent 82b6f4b556
commit a489b6a8e3

View File

@ -919,4 +919,5 @@ AVCodec ff_cfhd_encoder = {
AV_PIX_FMT_GBRAP12,
AV_PIX_FMT_NONE
},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};