]> git.nihav.org Git - nihav.git/commitdiff
avi: skip LISTs inside movi data
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 28 Jun 2017 10:46:27 +0000 (12:46 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 28 Jun 2017 10:46:27 +0000 (12:46 +0200)
src/demuxers/avi.rs

index 3810bc82d99e49989d373660c07cf6ff6b64e535..4be5217d2cffbf59839947d73aecefec84d595b5 100644 (file)
@@ -90,6 +90,12 @@ impl<'a> Demux<'a> for AVIDemuxer<'a> {
                 self.src.read_skip(size)?;
                 continue;
             }
+            if mktag!(tag) == mktag!(b"LIST") {
+                self.movi_size -= 12;
+                self.src.read_skip(4)?;
+                if self.movi_size == 0 { return Err(EOF); }
+                continue;
+            }
             if tag[0] < b'0' || tag[0] > b'9' || tag[1] < b'0' || tag[1] > b'9' {
                 return Err(InvalidData);
             }