[FFmpeg-cvslog] libavcodec/speexdec: fix memleak in error path

Zhao Zhili git at videolan.org
Mon Oct 11 16:34:48 EEST 2021


ffmpeg | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Mon Oct 11 15:39:39 2021 +0800| [a742ba60f14ee1265d01a5da59483ab7c2a6431c] | committer: Andreas Rheinhardt

libavcodec/speexdec: fix memleak in error path

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/speexdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/speexdec.c b/libavcodec/speexdec.c
index 35270e6723..fccceab74c 100644
--- a/libavcodec/speexdec.c
+++ b/libavcodec/speexdec.c
@@ -1586,5 +1586,5 @@ const AVCodec ff_speex_decoder = {
     .close          = speex_decode_close,
     .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_data_size = sizeof(SpeexContext),
-    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
 };



More information about the ffmpeg-cvslog mailing list