[FFmpeg-cvslog] r15021 - trunk/libavcodec/dca.c

andoma subversion
Fri Aug 29 12:12:44 CEST 2008


Author: andoma
Date: Fri Aug 29 12:12:44 2008
New Revision: 15021

Log:
dca: Set data_size outside block loop.



Modified:
   trunk/libavcodec/dca.c

Modified: trunk/libavcodec/dca.c
==============================================================================
--- trunk/libavcodec/dca.c	(original)
+++ trunk/libavcodec/dca.c	Fri Aug 29 12:12:44 2008
@@ -1183,12 +1183,11 @@ static int dca_decode_frame(AVCodecConte
 
     if(*data_size < (s->sample_blocks / 8) * 256 * sizeof(int16_t) * channels)
         return -1;
-    *data_size = 0;
+    *data_size = 256 / 8 * s->sample_blocks * sizeof(int16_t) * channels;
     for (i = 0; i < (s->sample_blocks / 8); i++) {
         dca_decode_block(s);
         s->dsp.float_to_int16_interleave(samples, s->samples_chanptr, 256, channels);
         samples += 256 * channels;
-        *data_size += 256 * sizeof(int16_t) * channels;
     }
 
     return buf_size;




More information about the ffmpeg-cvslog mailing list