From 9708d52ee83a393f830f5cadbba56b9ee772141a Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sat, 26 Apr 2008 13:03:41 +0000 Subject: [PATCH] correctly compute out_size and samples number Originally committed as revision 12985 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpegaudiodec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 1691a77e4d..df2803397c 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -2596,11 +2596,10 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, } ff_mpegaudio_decode_header(m, header); - mp_decode_frame(m, decoded_buf, start, fsize); + out_size += mp_decode_frame(m, decoded_buf, start, fsize); - n = MPA_FRAME_SIZE * m->nb_channels; - out_size += n * sizeof(OUT_INT); if(s->frames > 1) { + n = m->avctx->frame_size*m->nb_channels; /* interleave output data */ bp = out_samples + coff[fr]; if(m->nb_channels == 1) { -- GitLab