From ff7cb24a554c244c7494a981f4ad2c712804a271 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 22 Nov 2022 17:50:46 +0100 Subject: [PATCH] avi: fix wrong variable in seek code --- nihav-commonfmt/src/demuxers/avi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index 1e7a10f..007e7c3 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -243,7 +243,7 @@ impl<'a> DemuxCore<'a> for AVIDemuxer<'a> { } if seek_info.pos < self.movi_pos { return Err(DemuxerError::SeekError); } let skip_size = (seek_info.pos - self.movi_pos) as usize; - if skip_size > self.movi_size { return Err(DemuxerError::SeekError); } + if skip_size > self.movi_orig { return Err(DemuxerError::SeekError); } self.movi_size = self.movi_orig - skip_size; self.cur_frame[seek_info.str_id as usize] = seek_info.pts; -- 2.39.5