[FFmpeg-cvslog] mp3on4: copy MPADSPContext from first context to all contexts.

Justin Ruggles git at videolan.org
Sat Oct 22 01:26:49 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Sep 25 12:16:34 2011 -0400| [cb72230dfadb28651e036d717dc12d33b18a6893] | committer: Justin Ruggles

mp3on4: copy MPADSPContext from first context to all contexts.

Fixes segfault when decoding multi-channel MP3onMP4 files.

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

 libavcodec/mpegaudiodec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 2af05ed..5d15d25 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1959,6 +1959,7 @@ static int decode_init_mp3on4(AVCodecContext * avctx)
         s->mp3decctx[i] = av_mallocz(sizeof(MPADecodeContext));
         s->mp3decctx[i]->adu_mode = 1;
         s->mp3decctx[i]->avctx = avctx;
+        s->mp3decctx[i]->mpadsp = s->mp3decctx[0]->mpadsp;
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list