diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-10-14 18:22:13 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-10-14 18:22:13 +0200 |
commit | 51382a9ad683e7b4d5907f63cd8e103f531f577c (patch) | |
tree | 9b371e923ceb1a6e433e721dd3e9826bd8143925 /nihav-commonfmt | |
parent | 85a7799ef2c726f35f92b68f3b07e04d44611536 (diff) | |
download | nihav-51382a9ad683e7b4d5907f63cd8e103f531f577c.tar.gz |
avi: ignore ODML 'ix' chunks at the beginning of 'movi' list
Diffstat (limited to 'nihav-commonfmt')
-rw-r--r-- | nihav-commonfmt/src/demuxers/avi.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index 2329ae9..c4b4817 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -140,11 +140,16 @@ impl<'a> DemuxCore<'a> for AVIDemuxer<'a> { continue; } if (tag[0] == b'i' && tag[1] == b'x') || (&tag == b"idx1") { + let idx_pos = self.src.tell() - 8; if !self.odml { return Err(EOF); } self.src.read_skip(size)?; - self.try_next_odml_chunk()?; + if idx_pos > self.movi_pos { + self.try_next_odml_chunk()?; + } else { + self.movi_pos = self.src.tell(); + } continue; } if tag[0] < b'0' || tag[0] > b'9' || tag[1] < b'0' || tag[1] > b'9' { |