From: Kostya Shishkov Date: Sun, 25 Jun 2017 07:14:51 +0000 (+0200) Subject: avi: fix the situation when last chunk is padded X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=3ff4cebbb4d6d7eefa9879eeef59de02481a00cc;p=nihav.git avi: fix the situation when last chunk is padded --- diff --git a/src/demuxers/avi.rs b/src/demuxers/avi.rs index 67195c2..3810bc8 100644 --- a/src/demuxers/avi.rs +++ b/src/demuxers/avi.rs @@ -81,6 +81,7 @@ impl<'a> Demux<'a> for AVIDemuxer<'a> { if (self.src.tell() & 1) == 1 { self.src.read_skip(1)?; self.movi_size -= 1; + if self.movi_size == 0 { return Err(EOF); } } self.src.read_buf(&mut tag)?; let size = self.src.read_u32le()? as usize;