From: Kostya Shishkov Date: Sat, 27 May 2017 10:43:44 +0000 (+0200) Subject: AVI demuxer: align chunk pos X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=aa7dab8e525e1e55470f696bb567d94a3d331e03;hp=3f29a2a8c129f8d9bea68b235d5c3a649d60be2c;p=nihav.git AVI demuxer: align chunk pos --- 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") {