[FFmpeg-devel] [PATCH 11/11] avcodec/ac3enc: Fix invalid shift
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Fri Sep 20 01:17:06 EEST 2019
Fixes the FATE-tests unknown_layout-ac3, ac3-fixed-encode, ac3-encode
and eac3-encode. It furthermore fixes the ac3-encoder bugs mentioned in
tickets #7994, #8144 and #8159.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavcodec/ac3enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index f1c95ce877..76872a8fe0 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1065,7 +1065,7 @@ static int bit_alloc(AC3EncodeContext *s, int snr_offset)
{
int blk, ch;
- snr_offset = (snr_offset - 240) << 2;
+ snr_offset = (snr_offset - 240) * 4;
reset_block_bap(s);
for (blk = 0; blk < s->num_blocks; blk++) {
--
2.20.1
More information about the ffmpeg-devel
mailing list