From: Kostya Shishkov Date: Sun, 30 Jul 2017 10:15:28 +0000 (+0200) Subject: avi: ignore zero frames X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=741d97d843bb3851dbb0275068b7ae601d3db897;p=nihav.git avi: ignore zero frames --- diff --git a/src/demuxers/avi.rs b/src/demuxers/avi.rs index c00df25..9eb9517 100644 --- a/src/demuxers/avi.rs +++ b/src/demuxers/avi.rs @@ -104,6 +104,11 @@ impl<'a> Demux<'a> for AVIDemuxer<'a> { let str = self.dmx.get_stream(stream_no as usize); if let None = str { return Err(InvalidData); } let stream = str.unwrap(); + if size == 0 { + self.movi_size -= 8; + if self.movi_size == 0 { return Err(EOF); } + continue; + } let (tb_num, tb_den) = stream.get_timebase(); let ts = NATimeInfo::new(Some(self.cur_frame[stream_no as usize]), None, None, tb_num, tb_den); let pkt = self.src.read_packet(stream, ts, false, size)?;