This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 78a0309735 avformat/movenc: don't overwrite track_duration on every
src_track
78a0309735 is described below
commit 78a0309735337c642788085e0a9f30b793e171bd
Author: Zhao Zhili <[email protected]>
AuthorDate: Mon May 18 17:58:49 2026 +0800
Commit: James Almer <[email protected]>
CommitDate: Mon May 25 02:31:09 2026 +0000
avformat/movenc: don't overwrite track_duration on every src_track
When a tmcd or similar metadata track references multiple source
tracks, the per-iteration assignment overwrote track->track_duration
on each loop step, leaving it set to whatever the last source happened
to be.
---
libavformat/movenc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index bd9e13adeb..46d24bb967 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5393,7 +5393,12 @@ static int mov_write_moov_tag(AVIOContext *pb,
MOVMuxContext *mov,
int ret = mov_add_tref_id(mov, tag, track->track_id);
if (ret < 0)
return ret;
- //src_trk may have a different timescale than the tmcd track
+ }
+ if (track->nb_src_track) {
+ /* Derive the duration from the first source track, matching
+ * the convention used by get_pts_range() and the rtp/lvc1
+ * branches above. The source may use a different timescale. */
+ int src_trk = track->src_track[0];
track->track_duration =
av_rescale(mov->tracks[src_trk].track_duration,
track->timescale,
mov->tracks[src_trk].timescale);
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]