Skip to content

Commit caf04de

Browse files
Update src/rust/src/demuxer/demux.rs
Co-authored-by: Prateek Sunal <[email protected]>
1 parent 0f45c61 commit caf04de

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/rust/src/demuxer/demux.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ impl CcxDemuxer<'_> {
9999
} else {
100100
self.pids_seen[..MAX_PID].fill(0);
101101
}
102-
// Set each min_pts[i] to u64::MAX for i in 0..=MAX_PSI_PID.
103-
for i in 0..=MAX_PSI_PID {
104-
if !self.min_pts.is_empty() {
102+
if self.min_pts.len() != MAX_PSI_PID + 1 {
103+
self.min_pts.resize(MAX_PSI_PID + 1, u64::MAX);
104+
} else {
105+
// Set each min_pts[i] to u64::MAX for i in 0..=MAX_PSI_PID.
106+
for i in 0..=MAX_PSI_PID {
105107
self.min_pts[i] = u64::MAX;
106108
}
107109
}

0 commit comments

Comments
 (0)