diff options
author | Kostya Shishkov <[email protected]> | 2020-08-27 10:51:18 +0200 |
---|---|---|
committer | Kostya Shishkov <[email protected]> | 2020-08-27 10:51:18 +0200 |
commit | f5324ff941e77c55382782b5a25864257553fb48 (patch) | |
tree | bf926e270c8474b22bf8d81809453623e5622f55 | |
parent | b103b7b26e1ceb2a5529960b4f407e55dd51c910 (diff) |
aac: add missing heading bit to escape value
Reported by Philip Deljanov
-rw-r--r-- | nihav-commonfmt/src/codecs/aac.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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<i16> { 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 { |