summaryrefslogtreecommitdiff
path: root/libavcodec/ac3.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-11-03 02:59:18 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-11-03 02:59:18 +0000
commit94593c9b52c2c8d6c2b11eb8b7a0ef1cb1d6f43c (patch)
treefa9f5162db22643b7f48f26bd86b853f3611da7b /libavcodec/ac3.c
parent200267333c57a04e455178afaf08e7f7a63e44d8 (diff)
downloadffmpeg-94593c9b52c2c8d6c2b11eb8b7a0ef1cb1d6f43c.tar.gz
Revert r20050, which caused decoding errors with at least one valid AC-3 file.
Originally committed as revision 20437 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3.c')
-rw-r--r--libavcodec/ac3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c
index f0f14e360c..72312c7ed2 100644
--- a/libavcodec/ac3.c
+++ b/libavcodec/ac3.c
@@ -228,7 +228,7 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end,
band = bin_to_band_tab[start];
do {
int m = (FFMAX(mask[band] - snr_offset - floor, 0) & 0x1FE0) + floor;
- int band_end = FFMIN(bin + ff_ac3_critical_band_size_tab[band], end);
+ int band_end = FFMIN(band_start_tab[band] + ff_ac3_critical_band_size_tab[band], end);
for (; bin < band_end; bin++) {
int address = av_clip((psd[bin] - m) >> 5, 0, 63);
bap[bin] = bap_tab[address];