Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isomp4 take track id from the media source #324

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion symphonia-format-isomp4/src/demuxer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ impl<'s> IsoMp4Reader<'s> {
}

// Instantiate a `TrackState` for each track in the media.
let track_states = (0..moov.traks.len()).map(TrackState::new).collect::<Vec<TrackState>>();
let track_states = moov
.traks
.iter()
.map(|trak| TrackState::new(trak.tkhd.id as usize))
.collect::<Vec<TrackState>>();

// Instantiate a `Track` for all track states above.
let tracks = track_states
Expand Down