[FFmpeg-devel] [PATCH] lavc/vaapi_encode: add FF_CODEC_CAP_INIT_CLEANUP caps for encoders
Timo Rothenpieler
timo at rothenpieler.org
Mon May 4 08:19:49 EEST 2020
On 31.03.2020 17:34, Linjie Fu wrote:
> ff_vaapi_encode_close() is not enough to free the resources like cbs
> if initialization failure happens after codec->configure (except for
> vp8/vp9).
>
> We need to call avctx->codec->close() to deallocate, otherwise memory
> leak happens.
>
> Add FF_CODEC_CAP_INIT_CLEANUP for vaapi encoders and deallocate the
> resources at free_and_end inside avcodec_open2().
>
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
Not my area of code, but the patch looks straight forward enough to my eyes.
More information about the ffmpeg-devel
mailing list