diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-12-16 09:56:08 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-12-16 09:56:08 +0100 |
commit | d4547e6a80fe0dcc76b7453c8b85664738a0e466 (patch) | |
tree | e3ec0eb2b65e540632e772881a6234b074f1e4d3 | |
parent | 4a1ca15c9298340e8f2cb2ad6016109375cc45b9 (diff) | |
download | nihav-d4547e6a80fe0dcc76b7453c8b85664738a0e466.tar.gz |
aac: issue a warning instead of an error on window sequence mismatch
-rw-r--r-- | nihav-commonfmt/src/codecs/aac.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nihav-commonfmt/src/codecs/aac.rs b/nihav-commonfmt/src/codecs/aac.rs index 0329eb5..09a5b6b 100644 --- a/nihav-commonfmt/src/codecs/aac.rs +++ b/nihav-commonfmt/src/codecs/aac.rs @@ -325,12 +325,16 @@ impl ICSInfo { self.window_sequence = br.read(2)? as u8; match self.prev_window_sequence { ONLY_LONG_SEQUENCE | LONG_STOP_SEQUENCE => { - validate!((self.window_sequence == ONLY_LONG_SEQUENCE) || - (self.window_sequence == LONG_START_SEQUENCE)); + if (self.window_sequence != ONLY_LONG_SEQUENCE) && + (self.window_sequence != LONG_START_SEQUENCE) { + println!("incorrect previous window"); + } }, LONG_START_SEQUENCE | EIGHT_SHORT_SEQUENCE => { - validate!((self.window_sequence == EIGHT_SHORT_SEQUENCE) || - (self.window_sequence == LONG_STOP_SEQUENCE)); + if (self.window_sequence != EIGHT_SHORT_SEQUENCE) && + (self.window_sequence != LONG_STOP_SEQUENCE) { + println!("incorrect previous window"); + } }, _ => {}, }; |