From: Kostya Shishkov Date: Tue, 22 Nov 2022 16:50:46 +0000 (+0100) Subject: avi: fix wrong variable in seek code X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=ff7cb24a554c244c7494a981f4ad2c712804a271;p=nihav.git avi: fix wrong variable in seek code --- 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;