diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-10-21 17:47:02 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-10-21 17:47:02 +0200 |
commit | 9dc04b27b5c16e36d19632e70136379b738813ce (patch) | |
tree | d123a5b53a84134b31b97ba582f20136236adbd2 /nihav-commonfmt | |
parent | f27ea035cd317d711af90655d8ced4b64544b541 (diff) | |
download | nihav-9dc04b27b5c16e36d19632e70136379b738813ce.tar.gz |
avi: skip chunks from unknown streams
Diffstat (limited to 'nihav-commonfmt')
-rw-r--r-- | nihav-commonfmt/src/demuxers/avi.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index bc39234..dc8ea6b 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -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; |