From f5324ff941e77c55382782b5a25864257553fb48 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 27 Aug 2020 10:51:18 +0200 Subject: [PATCH] aac: add missing heading bit to escape value Reported by Philip Deljanov --- nihav-commonfmt/src/codecs/aac.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/nihav-commonfmt/src/codecs/aac.rs b/nihav-commonfmt/src/codecs/aac.rs index 5058a44..e5697b7 100644 --- a/nihav-commonfmt/src/codecs/aac.rs +++ b/nihav-commonfmt/src/codecs/aac.rs @@ -882,6 +882,7 @@ fn read_escape(br: &mut BitReader, sign: bool) -> DecoderResult { let prefix = br.read_code(UintCodeType::UnaryOnes)? as u8; validate!(prefix < 9); let bits = br.read(prefix + 4)? as i16; + let bits = bits | (1 << (prefix + 4)); if sign { Ok(bits) } else { -- 2.39.5