From: Kostya Shishkov Date: Wed, 16 Dec 2020 08:56:08 +0000 (+0100) Subject: aac: issue a warning instead of an error on window sequence mismatch X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=d4547e6a80fe0dcc76b7453c8b85664738a0e466;p=nihav.git aac: issue a warning instead of an error on window sequence mismatch --- 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"); + } }, _ => {}, };