diff --git a/symphonia-format-isomp4/src/demuxer.rs b/symphonia-format-isomp4/src/demuxer.rs index 7082edb8..aa728542 100644 --- a/symphonia-format-isomp4/src/demuxer.rs +++ b/symphonia-format-isomp4/src/demuxer.rs @@ -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::>(); + let track_states = moov + .traks + .iter() + .map(|trak| TrackState::new(trak.tkhd.id as usize)) + .collect::>(); // Instantiate a `Track` for all track states above. let tracks = track_states