]> git.nihav.org Git - nihav.git/commitdiff
avi: fix wrong variable in seek code
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 22 Nov 2022 16:50:46 +0000 (17:50 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 22 Nov 2022 16:50:46 +0000 (17:50 +0100)
nihav-commonfmt/src/demuxers/avi.rs

index 1e7a10fe57f495a314efe107b3f7e74a9da64ae8..007e7c3f9326df410bb0b9cdc5e69b5c5ee06ee4 100644 (file)
@@ -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;