aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2022-11-22 17:50:46 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2022-11-22 17:50:46 +0100
commitff7cb24a554c244c7494a981f4ad2c712804a271 (patch)
tree107a9633b4e6e79c9abd2a33d211a87cec1b6146
parent3cd340f1334d99c00899a2b8869edc440ade40c9 (diff)
downloadnihav-ff7cb24a554c244c7494a981f4ad2c712804a271.tar.gz
avi: fix wrong variable in seek code
-rw-r--r--nihav-commonfmt/src/demuxers/avi.rs2
1 files changed, 1 insertions, 1 deletions
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;