Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Öman <andreas@lonelycoder.com>2008-08-29 14:12:44 +0400
committerAndreas Öman <andreas@lonelycoder.com>2008-08-29 14:12:44 +0400
commita7bc9d1b71efa2918c31fca34c5c1a0f1ac4433f (patch)
tree3ec50ea30a18eda26a5a0fe4d8f766b5d84145ca /libavcodec/dca.c
parent8ed96a5eba8622f49d8b512087973cd54e2e4a27 (diff)
dca: Set data_size outside block loop.
Originally committed as revision 15021 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r--libavcodec/dca.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index b4afd51087..7eeecc0e7d 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -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;