Commit b536d372 authored by andoma's avatar andoma

dca: Set data_size outside block loop.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15021 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c141258b
......@@ -1183,12 +1183,11 @@ static int dca_decode_frame(AVCodecContext * avctx,
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment