summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2015-03-14 11:48:57 +0000
committerMichael Niedermayer <michaelni@gmx.at>2015-03-14 14:05:18 +0100
commitb0834400608b3980c06bf6d2cf747116e60d10c7 (patch)
tree61739f932c8ac6daf09ad575aa744192d502bb46 /libavcodec/ac3dec.c
parent15ce160183c61fbd98915e07879f1225fcf1c080 (diff)
ac3_fixed: fix out-of-bound read
Should also improve decoding, but actually doesn't... Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 2f78d73ce8..ce451865db 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -872,7 +872,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
start_subband += start_subband - 7;
end_subband = get_bits(gbc, 3) + 5;
#if USE_FIXED
- s->spx_dst_end_freq = end_freq_inv_tab[end_subband];
+ s->spx_dst_end_freq = end_freq_inv_tab[end_subband-5];
#endif
if (end_subband > 7)
end_subband += end_subband - 7;