mov: mark segments start as seeking points
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 24 Jun 2021 09:08:07 +0000 (11:08 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 24 Jun 2021 09:08:07 +0000 (11:08 +0200)
nihav-commonfmt/src/demuxers/mov.rs

index 745f440..99a3762 100644 (file)
@@ -984,6 +984,9 @@ fn read_trun(track: &mut Track, br: &mut ByteReader, size: u64) -> DemuxerResult
         track.ctts_map.reserve(sample_count);
     }
 
+    if track.chunk_offsets.len() < (std::u32::MAX as usize) {
+        track.keyframes.push((track.chunk_offsets.len() + 1) as u32);
+    }
     for _ in 0..sample_count {
         if sample_duration_present {
             let _duration       = br.read_u32be()?;