mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-01-03 00:48:40 +00:00
bugfix: sample offset larger than u32 max
This commit is contained in:
parent
35560e94f5
commit
f5744a39e2
1 changed files with 3 additions and 3 deletions
|
@ -490,12 +490,12 @@ impl Mp4Track {
|
|||
|
||||
let first_sample_in_chunk = sample_id - (sample_id - first_sample) % samples_per_chunk;
|
||||
|
||||
let mut sample_offset = 0;
|
||||
let mut sample_offset: u64 = 0;
|
||||
for i in first_sample_in_chunk..sample_id {
|
||||
sample_offset += self.sample_size(i)?;
|
||||
sample_offset += self.sample_size(i)? as u64;
|
||||
}
|
||||
|
||||
Ok(chunk_offset + sample_offset as u64)
|
||||
Ok(chunk_offset + sample_offset)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue