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

Andreas Rheinhardt git at videolan.org
Sat Apr 3 01:19:15 EEST 2021


ffmpeg | branch: release/4.4 | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Mon Nov 30 22:24:10 2020 +0100| [632262f184bfd38e9b16423633d1f57ddc7760d5] | committer: Andreas Rheinhardt

avcodec/binkaudio: Fix memleak upon init failure

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
(cherry picked from commit 85aed2e390799dc4037a6f0b95310dfda44fa6eb)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=632262f184bfd38e9b16423633d1f57ddc7760d5
---

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

diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 381fc4cd15..e0f12cefb1 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -345,6 +345,7 @@ AVCodec ff_binkaudio_rdft_decoder = {
     .close          = decode_end,
     .receive_frame  = binkaudio_receive_frame,
     .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
 
 AVCodec ff_binkaudio_dct_decoder = {
@@ -357,4 +358,5 @@ AVCodec ff_binkaudio_dct_decoder = {
     .close          = decode_end,
     .receive_frame  = binkaudio_receive_frame,
     .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };



More information about the ffmpeg-cvslog mailing list