Skip to content

Commit

Permalink
Allow sample_time to wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jensenn committed Jan 12, 2024
1 parent 35560e9 commit 5688950
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,12 @@ impl Mp4Track {
)?;
}
let duration = trun.sample_durations[sample_idx];
return Ok((base_start_time + start_offset, duration));
return Ok((base_start_time.wrapping_add(start_offset), duration));
}
}
}
let start_offset = ((sample_id - 1) * default_sample_duration) as u64;
Ok((base_start_time + start_offset, default_sample_duration))
Ok((base_start_time.wrapping_add(start_offset), default_sample_duration))
} else {
let stts = &self.trak.mdia.minf.stbl.stts;

Expand Down

0 comments on commit 5688950

Please sign in to comment.