Browse Source

dca: dont overread dca_default_coeffs.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
d7bce4a274
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/dca.c

+ 4
- 0
libavcodec/dca.c View File

@@ -801,10 +801,14 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
}
} else {
int am = s->amode & DCA_CHANNEL_MASK;
if (am < 16) {
for (j = base_channel; j < s->prim_channels; j++) {
s->downmix_coef[j][0] = dca_default_coeffs[am][j][0];
s->downmix_coef[j][1] = dca_default_coeffs[am][j][1];
}
} else {
av_log(s->avctx, AV_LOG_WARNING, "amode > 15 default downmix_coef unsupported\n");
}
}
}



Loading…
Cancel
Save