From 741d97d843bb3851dbb0275068b7ae601d3db897 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 30 Jul 2017 12:15:28 +0200 Subject: [PATCH] avi: ignore zero frames --- src/demuxers/avi.rs | 5 +++++ 1 file changed, 5 insertions(+) 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)?; -- 2.39.5