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 166b8be618 avformat/mov: prefer the stts duration over mdhd
166b8be618 is described below
commit 166b8be618639ca2ff2b9f34450652d6d932db82
Author: Baptiste Coudurier <[email protected]>
AuthorDate: Fri Nov 13 13:43:55 2026 -0800
Commit: Baptiste Coudurier <[email protected]>
CommitDate: Sat Nov 21 07:28:06 2026 +0000
avformat/mov: prefer the stts duration over mdhd
The media duration can't be shorter than the sample table, so use the
stts sum. This also covers a clipped or missing mdhd duration.
Fixes: #22532
Signed-off-by: Baptiste Coudurier <[email protected]>
---
libavformat/mov.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3fe0304f4d..9ad780cde9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4044,8 +4044,10 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb,
MOVAtom atom)
}
st->nb_frames= total_sample_count;
+ // The media duration can't be shorter than the sample table, so prefer
+ // the latter when they differ.
if (duration)
- st->duration= FFMIN(st->duration, duration);
+ st->duration = duration;
// All samples have zero duration. They have higher chance be chose by
// mov_find_next_sample, which leads to seek again and again.
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]