From 3ff4cebbb4d6d7eefa9879eeef59de02481a00cc Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 25 Jun 2017 09:14:51 +0200 Subject: [PATCH] avi: fix the situation when last chunk is padded --- src/demuxers/avi.rs | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.5