1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2025-04-15 08:14:15 +00:00
This commit is contained in:
Andrew Straw 2024-06-15 07:18:16 +02:00 committed by GitHub
commit 6bf5384db1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}
}