This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 642ae726ff3a0d8d8c9416c0f1968b936df7e9c4
Author:     James Almer <[email protected]>
AuthorDate: Tue Jul 21 10:44:32 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Wed Jul 22 20:50:14 2026 -0300

    avformat/matroska: rescale default duration derived block durations to 
stream timebase
    
    Block timestamps and durations are in Track Ticks, meaning they are scaled 
with both
    Segment timescale and Track timescale.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/matroskadec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 18849af689..8e24433cf8 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -4365,7 +4365,9 @@ static int matroska_parse_block(MatroskaDemuxContext 
*matroska, AVBufferRef *buf
     }
 
     if (!block_duration && trust_default_duration)
-        block_duration = track->default_duration * laces / 
matroska->time_scale;
+        block_duration = av_rescale_q(track->default_duration * laces,
+                                      (AVRational) { 1, 1000000000 },
+                                      st->time_base);
 
     if (cluster_time != (uint64_t)-1 && (block_time >= 0 || cluster_time >= 
-block_time))
         track->end_timecode =

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to