From 3b4599a4d7ee433bffddbc0fb411c75b61de1d9f Mon Sep 17 00:00:00 2001 From: jbr Date: Tue, 3 Nov 2009 02:59:18 +0000 Subject: [PATCH] Revert r20050, which caused decoding errors with at least one valid AC-3 file. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20437 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavcodec/ac3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c index f0f14e360..72312c7ed 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]; -- 2.39.2