From aa7dab8e525e1e55470f696bb567d94a3d331e03 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 27 May 2017 12:43:44 +0200 Subject: [PATCH] AVI demuxer: align chunk pos --- src/demuxers/avi.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/demuxers/avi.rs b/src/demuxers/avi.rs index e5f688a..56cf023 100644 --- a/src/demuxers/avi.rs +++ b/src/demuxers/avi.rs @@ -78,6 +78,10 @@ impl<'a> Demux<'a> for AVIDemuxer<'a> { if self.movi_size == 0 { return Err(EOF); } let mut tag: [u8; 4] = [0; 4]; loop { + if (self.src.tell() & 1) == 1 { + self.src.read_skip(1)?; + self.movi_size -= 1; + } self.src.read_buf(&mut tag)?; let size = self.src.read_u32le()? as usize; if mktag!(tag) == mktag!(b"JUNK") { -- 2.39.5