diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-17 01:35:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-17 01:35:14 +0100 |
commit | d28dfa2d425ce5e5db38924577b3d86dcee40523 (patch) | |
tree | 1f88ffa780528831202c36945940622df4773535 | |
parent | 7973a07590f2b376b5453c4553bec97a800182ab (diff) | |
download | ffmpeg-d28dfa2d425ce5e5db38924577b3d86dcee40523.tar.gz |
ac3dec: fix outptr increment.
Fixes decoding regression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/ac3dec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 0bc1adafdd..4ca735f536 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1402,9 +1402,8 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, memcpy(((float*)s->frame.data[ch]) + AC3_BLOCK_SIZE*blk, output[ch], 1024); for (ch = 0; ch < s->out_channels; ch++) { output[ch] = s->outptr[channel_map[ch]]; - } - for (ch = 0; ch < s->channels; ch++) { - s->outptr[ch] += AC3_BLOCK_SIZE; + if (!ch || channel_map[ch]) + s->outptr[channel_map[ch]] += AC3_BLOCK_SIZE; } } |