[FFmpeg-devel] [PATCH] mpegaudiodec_template: fix leaking fdsp for mp3on4float

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Thu Feb 16 01:39:17 EET 2017


Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
 libavcodec/mpegaudiodec_template.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index 1114428f33..53c09edced 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -1828,6 +1828,9 @@ static av_cold int decode_close_mp3on4(AVCodecContext * avctx)
     MP3On4DecodeContext *s = avctx->priv_data;
     int i;
 
+    if (s->mp3decctx[0])
+        av_freep(&s->mp3decctx[0]->fdsp);
+
     for (i = 0; i < s->frames; i++)
         av_freep(&s->mp3decctx[i]);
 
-- 
2.11.0


More information about the ffmpeg-devel mailing list