[FFmpeg-cvslog] avcodec/a64multienc: Fix memleak upon init failure

Andreas Rheinhardt git at videolan.org
Sun Nov 29 01:39:30 EET 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Nov 26 13:48:09 2020 +0100| [5baee59301bdf7f6dbf80ceaf5d5b38c9b385571] | committer: Andreas Rheinhardt

avcodec/a64multienc: Fix memleak upon init failure

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=5baee59301bdf7f6dbf80ceaf5d5b38c9b385571
---

 libavcodec/a64multienc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 38f25020f5..5f4825d55d 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -407,6 +407,7 @@ AVCodec ff_a64multi_encoder = {
     .close          = a64multi_close_encoder,
     .pix_fmts       = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
     .capabilities   = AV_CODEC_CAP_DELAY,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
 #endif
 #if CONFIG_A64MULTI5_ENCODER
@@ -421,5 +422,6 @@ AVCodec ff_a64multi5_encoder = {
     .close          = a64multi_close_encoder,
     .pix_fmts       = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
     .capabilities   = AV_CODEC_CAP_DELAY,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
 #endif



More information about the ffmpeg-cvslog mailing list