mpegaudiodec_template: fix leaking fdsp for mp3on4float
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 15 Feb 2017 23:37:51 +0000 (00:37 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fri, 17 Feb 2017 00:45:19 +0000 (01:45 +0100)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/mpegaudiodec_template.c

index 1114428..53c09ed 100644 (file)
@@ -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]);