diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-04-26 13:03:41 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-04-26 13:03:41 +0000 |
commit | 9708d52ee83a393f830f5cadbba56b9ee772141a (patch) | |
tree | 4b1b9cfd2fce70945db71e60696f025a6b38e9d1 | |
parent | cd3289650ac7fe17f14aa06cc3b2a8c101a13db4 (diff) | |
download | ffmpeg-9708d52ee83a393f830f5cadbba56b9ee772141a.tar.gz |
correctly compute out_size and samples number
Originally committed as revision 12985 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegaudiodec.c | 5 |
1 files 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) { |