summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/ac3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index d664325a29..3edb3aff83 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1400,7 +1400,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
memcpy(s->outptr[channel_map[ch]], output[ch], sizeof(**output) * AC3_BLOCK_SIZE);
for (ch = 0; ch < s->out_channels; ch++)
output[ch] = s->outptr[channel_map[ch]];
- for (ch = 0; ch < s->channels; ch++)
+ for (ch = 0; ch < s->out_channels; ch++)
s->outptr[ch] += AC3_BLOCK_SIZE;
}