aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-commonfmt/src/demuxers
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2022-12-23 08:39:09 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2022-12-23 08:39:09 +0100
commita970b2110488aeff5855743d1728ee83462e8306 (patch)
tree7249068ac35dd72ba93b172fc3620ed7ac9a2aa2 /nihav-commonfmt/src/demuxers
parent534a5b60b896020c2113a29436333e4b1ec83334 (diff)
downloadnihav-a970b2110488aeff5855743d1728ee83462e8306.tar.gz
mov: sanitise position on seek error
Diffstat (limited to 'nihav-commonfmt/src/demuxers')
-rw-r--r--nihav-commonfmt/src/demuxers/mov.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/nihav-commonfmt/src/demuxers/mov.rs b/nihav-commonfmt/src/demuxers/mov.rs
index 9cf82a9..f4cd393 100644
--- a/nihav-commonfmt/src/demuxers/mov.rs
+++ b/nihav-commonfmt/src/demuxers/mov.rs
@@ -1516,6 +1516,9 @@ impl Track {
csamp += cur_samps;
if csamp > self.cur_sample {
if self.cur_chunk >= self.chunk_offsets.len() {
+ self.cur_sample = csamp - cur_samps;
+ self.samples_left = 0;
+ self.cur_sample = csamp;
return Err(DemuxerError::SeekError);
}
self.last_offset = self.chunk_offsets[self.cur_chunk];