]> git.nihav.org Git - nihav.git/commitdiff
movmuxer: handle writing just single time point in stts atom
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 29 Apr 2026 16:05:52 +0000 (18:05 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 29 Apr 2026 16:06:08 +0000 (18:06 +0200)
nihav-commonfmt/src/muxers/mov/mod.rs

index 9429465cc5f2b5777d77eea11b09d7a1bcb436a1..5e57ef92dd39c06d1142f3635e514d35f5e68b01 100644 (file)
@@ -112,7 +112,7 @@ impl ChunkAccount {
     }
 
     fn write_stts(&mut self, bw: &mut dyn ByteIO, raw_audio: bool, pktd: u64) -> MuxerResult<()> {
-        if !raw_audio {
+        if !raw_audio && self.pts.len() > 1 {
             let mut nentries = 1;
             let mut prev_delta = self.pts[1] - self.pts[0];
             for w in self.pts.windows(2).skip(1) {