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 e5e8efae5c libavformat/mov.c: Fix seek in fragmented mp4 files where
the audio and video streams are written to seperate fragments
e5e8efae5c is described below
commit e5e8efae5cd1b04bfb0f04735d091d3059458bdf
Author: Romain Beauxis <[email protected]>
AuthorDate: Fri Jan 2 14:09:54 2026 -0600
Commit: Romain Beauxis <[email protected]>
CommitDate: Sun Mar 8 16:22:24 2026 -0500
libavformat/mov.c: Fix seek in fragmented mp4 files where the audio and
video streams are written to seperate fragments
---
libavformat/mov.c | 2 ++
tests/fate/mpeg4.mak | 6 ++++++
tests/ref/fate/{filter-framerate-down => mpeg4-fragmented-seek} | 4 ++--
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9b7df252b2..c8eb95564e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1729,6 +1729,8 @@ static int64_t get_frag_time(AVFormatContext *s, AVStream
*dst_st,
}
for (i = 0; i < frag_index->item[index].nb_stream_info; i++) {
+ if (dst_st->id != frag_index->item[index].stream_info[i].id)
+ continue;
AVStream *frag_stream = NULL;
frag_stream_info = &frag_index->item[index].stream_info[i];
for (j = 0; j < s->nb_streams; j++) {
diff --git a/tests/fate/mpeg4.mak b/tests/fate/mpeg4.mak
index d6cce97a70..c914f61731 100644
--- a/tests/fate/mpeg4.mak
+++ b/tests/fate/mpeg4.mak
@@ -21,5 +21,11 @@ fate-m4v: CMD = framecrc -flags +bitexact -idct simple
-i $(TARGET_SAMPLES)/
FATE_MPEG4-$(call FRAMECRC, M4V, MPEG4, MPEG4VIDEO_PARSER FPS_FILTER) +=
fate-m4v-cfr
fate-m4v-cfr: CMD = framecrc -flags +bitexact -idct simple -i
$(TARGET_SAMPLES)/mpeg4/demo.m4v -vf fps=5
+# Test seeking in fragmented MP4 with separate audio/video fragments
+# Seeks to 1.04s and extracts 1 frame - should land on I-frame at 1.0s with
fix,
+# lands at start (0s) without fix due to get_frag_time() bug
+FATE_MPEG4-$(call FRAMECRC, MOV, H264, AAC_DECODER) +=
fate-mpeg4-fragmented-seek
+fate-mpeg4-fragmented-seek: CMD = framecrc -use_mfra_for pts -ss 1.04 -copyts
-noaccurate_seek -i $(TARGET_SAMPLES)/mpeg4/fragmented.mp4 -frames:v 1 -an
+
FATE_SAMPLES_AVCONV += $(FATE_MPEG4-yes)
fate-mpeg4: $(FATE_MPEG4-yes)
diff --git a/tests/ref/fate/filter-framerate-down
b/tests/ref/fate/mpeg4-fragmented-seek
similarity index 52%
copy from tests/ref/fate/filter-framerate-down
copy to tests/ref/fate/mpeg4-fragmented-seek
index c298de0779..5204e169aa 100644
--- a/tests/ref/fate/filter-framerate-down
+++ b/tests/ref/fate/mpeg4-fragmented-seek
@@ -1,6 +1,6 @@
-#tb 0: 1/1
+#tb 0: 1/25
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 320x240
#sar 0: 1/1
-0, 0, 0, 1, 115200, 0xeba70ff3
+0, 25, 25, 1, 115200, 0x19fdc3e8
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]