We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a10a83 commit cfeeab0Copy full SHA for cfeeab0
mp4parse_capi/src/lib.rs
@@ -841,7 +841,10 @@ impl<'a> Iterator for SampleToChunkIterator<'a> {
841
self.sample_count = next.samples_per_chunk;
842
// Total chunk number in 'stsc' could be different to 'stco',
843
// there could be more chunks at the last 'stsc' record.
844
- ((next.first_chunk - 1) .. next.first_chunk + self.remain_chunk_count -1)
+ match next.first_chunk.checked_add(self.remain_chunk_count) {
845
+ Some(r) => ((next.first_chunk - 1) .. r - 1),
846
+ _ => (0 .. 0),
847
+ }
848
},
849
_ => (0 .. 0),
850
};
0 commit comments