summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-17 01:35:14 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-17 01:35:14 +0100
commitd28dfa2d425ce5e5db38924577b3d86dcee40523 (patch)
tree1f88ffa780528831202c36945940622df4773535 /libavcodec
parent7973a07590f2b376b5453c4553bec97a800182ab (diff)
ac3dec: fix outptr increment.
Fixes decoding regression Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3dec.c5
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;
}
}