summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index f2cadf0800..883aa7fdb1 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -416,7 +416,8 @@ static void calc_transform_coeffs_cpl(AC3DecodeContext *s)
i = s->start_freq[CPL_CH];
for(bnd=0; bnd<s->num_cpl_bands; bnd++) {
- for (j = 0; j < s->cpl_band_sizes[bnd]; j++,i++) {
+ j = i + s->cpl_band_sizes[bnd];
+ for (; i < j; i++) {
for(ch=1; ch<=s->fbw_channels; ch++) {
if(s->channel_in_cpl[ch]) {
s->fixed_coeffs[ch][i] = ((int64_t)s->fixed_coeffs[CPL_CH][i] *