]> git.nihav.org Git - nihav.git/commitdiff
avi: fix the situation when last chunk is padded
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 25 Jun 2017 07:14:51 +0000 (09:14 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 25 Jun 2017 07:14:51 +0000 (09:14 +0200)
src/demuxers/avi.rs

index 67195c2ddb61c4b7bf4c9d9bea4bc1495cfeda2c..3810bc82d99e49989d373660c07cf6ff6b64e535 100644 (file)
@@ -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;