]> git.nihav.org Git - nihav.git/commitdiff
avi: skip chunks from unknown streams
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 21 Oct 2022 15:47:02 +0000 (17:47 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 21 Oct 2022 15:47:02 +0000 (17:47 +0200)
nihav-commonfmt/src/demuxers/avi.rs

index bc3923444c6e96bffff3afd5a1cacf4ca49447b0..dc8ea6bac1cf94d8faee065b996fb387c134f4bf 100644 (file)
@@ -168,7 +168,11 @@ impl<'a> DemuxCore<'a> for AVIDemuxer<'a> {
                 continue;
             }
             let str = strmgr.get_stream(stream_no as usize);
-            if str.is_none() { return Err(InvalidData); }
+            if str.is_none() {
+                self.src.read_skip(size)?;
+                self.movi_size -= size + 8;
+                continue;
+            }
             let stream = str.unwrap();
             if size == 0 {
                 self.movi_size -= 8;