From: Kostya Shishkov Date: Thu, 27 Aug 2020 08:51:18 +0000 (+0200) Subject: aac: add missing heading bit to escape value X-Git-Url: https://git.nihav.org/?p=nihav.git;a=commitdiff_plain;h=f5324ff941e77c55382782b5a25864257553fb48 aac: add missing heading bit to escape value Reported by Philip Deljanov --- 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 {