diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-29 21:14:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-29 21:18:54 +0100 |
commit | d7bce4a274c4fc7453cde2d1c5d8a7a5805718df (patch) | |
tree | a0917446b9a2586cf9b0e06d2ffaa08da53e164c /libavcodec/dca.c | |
parent | 51db9a97e9edde4c80218d194731e187ea7dcba8 (diff) | |
download | ffmpeg-d7bce4a274c4fc7453cde2d1c5d8a7a5805718df.tar.gz |
dca: dont overread dca_default_coeffs.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r-- | libavcodec/dca.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 33e41201fb..315826371c 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -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"); + } } } |