From 6350b1eea7d33fb87dae93c627ad8d3f6d644f9e Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 17 Aug 2019 16:22:25 +0200 Subject: [PATCH] avi: stop outputting frames when index is hit --- nihav-commonfmt/src/demuxers/avi.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index 13b05f8..cf66f36 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -87,6 +87,9 @@ impl<'a> DemuxCore<'a> for AVIDemuxer<'a> { if self.movi_size == 0 { return Err(EOF); } continue; } + if tag[0] == b'i' && tag[1] == b'x' { + return Err(EOF); + } if tag[0] < b'0' || tag[0] > b'9' || tag[1] < b'0' || tag[1] > b'9' { return Err(InvalidData); } -- 2.39.5