changeset 6691:863e939331aa libavcodec

correctly compute out_size and samples number
author bcoudurier
date Sat, 26 Apr 2008 13:03:41 +0000
parents 36e1f34d5428
children 25413354a79a
files mpegaudiodec.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Sat Apr 26 12:59:46 2008 +0000
+++ b/mpegaudiodec.c	Sat Apr 26 13:03:41 2008 +0000
@@ -2596,11 +2596,10 @@
         }
 
         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) {