Skip to content

Commit

Permalink
isomp4: take track id from the media source
Browse files Browse the repository at this point in the history
  • Loading branch information
sscobici committed Oct 23, 2024
1 parent dc287cc commit 976c0b3
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 976c0b3

Please sign in to comment.