From 243a5f4783410cb701c78cf353fd12135f7da3dd Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 1 Apr 2022 18:19:44 +0200 Subject: [PATCH] aac: do not add 16 to large coefficients --- nihav-mpeg/src/codecs/aac/coeff_read.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nihav-mpeg/src/codecs/aac/coeff_read.rs b/nihav-mpeg/src/codecs/aac/coeff_read.rs index d195b39..4a92f0a 100644 --- a/nihav-mpeg/src/codecs/aac/coeff_read.rs +++ b/nihav-mpeg/src/codecs/aac/coeff_read.rs @@ -97,10 +97,10 @@ fn decode_pairs(br: &mut BitReader, cb: &Codebook, unsigned: bool, escape: } if escape { if (x == 16) || (x == -16) { - x += read_escape(br, x > 0)?; + x = read_escape(br, x > 0)?; } if (y == 16) || (y == -16) { - y += read_escape(br, y > 0)?; + y = read_escape(br, y > 0)?; } } out[0] = iquant(f32::from(x)) * scale; -- 2.39.5