]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/proresenc_anatoliy: Fix memleak upon init error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 27 Nov 2020 14:08:00 +0000 (15:08 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Fri, 2 Apr 2021 16:45:05 +0000 (18:45 +0200)
A buffer may leak in case of YUVA444P10 with dimensions that are not
both divisible by 16.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/proresenc_anatoliy.c

index 588df5984cf0d459dce2db7fcc38c247a6308209..a4197870ec3029cf918ca09165560f4b4272d27e 100644 (file)
@@ -957,6 +957,7 @@ AVCodec ff_prores_aw_encoder = {
     .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
     .priv_class     = &proresaw_enc_class,
     .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
 
 AVCodec ff_prores_encoder = {
@@ -972,4 +973,5 @@ AVCodec ff_prores_encoder = {
     .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
     .priv_class     = &prores_enc_class,
     .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };