From: Kostya Shishkov Date: Fri, 21 Oct 2022 15:47:02 +0000 (+0200) Subject: avi: skip chunks from unknown streams X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=9dc04b27b5c16e36d19632e70136379b738813ce;p=nihav.git avi: skip chunks from unknown streams --- 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;