]> git.nihav.org Git - nihav.git/commitdiff
aac: issue a warning instead of an error on window sequence mismatch
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 16 Dec 2020 08:56:08 +0000 (09:56 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 16 Dec 2020 08:56:08 +0000 (09:56 +0100)
nihav-commonfmt/src/codecs/aac.rs

index 0329eb5423106ebf26fb635571db1275e756a26d..09a5b6b1dd582e90600e1b6ae16715ccfbf7f9f3 100644 (file)
@@ -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");
+                    }
                 },
             _ => {},
         };