]> git.nihav.org Git - nihav.git/commitdiff
avi: stop outputting frames when index is hit
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 17 Aug 2019 14:22:25 +0000 (16:22 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 17 Aug 2019 14:22:25 +0000 (16:22 +0200)
nihav-commonfmt/src/demuxers/avi.rs

index 13b05f8f5a038016b2ae2af6355dd82dcc38763c..cf66f36885438d1052c8c83bb2f967956d86e2ce 100644 (file)
@@ -87,6 +87,9 @@ impl<'a> DemuxCore<'a> for AVIDemuxer<'a> {
                 if self.movi_size == 0 { return Err(EOF); }
                 continue;
             }
+            if tag[0] == b'i' && tag[1] == b'x' {
+                return Err(EOF);
+            }
             if tag[0] < b'0' || tag[0] > b'9' || tag[1] < b'0' || tag[1] > b'9' {
                 return Err(InvalidData);
             }