Updated patchset. Patches 1-2 could maybe be squashed

The end result of these patches is that fragmented files probe much
faster over HTTP. The final patch is just a small optimization to
movenc

/Tomas
From 357be61ac65149b826769c07a7a3dbb7af7164db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <g...@haerdin.se>
Date: Wed, 11 Dec 2024 13:42:36 +0100
Subject: [PATCH 1/6] lavf/mov: Always try to parse mfra if file contains moof
 boxes

If the demuxer succeeds it will set c->frag_index.complete which will enable mov_read_default() to stop earlier.
This is useful for reducing the number of seeks in fragmented MP4 files.
---
 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3820983a5d..cfcd64b7db 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1805,7 +1805,7 @@ static int mov_read_moof(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     // Set by mov_read_tfhd(). mov_read_trun() will reject files missing tfhd.
     c->fragment.found_tfhd = 0;
 
-    if (!c->has_looked_for_mfra && c->use_mfra_for > 0) {
+    if (!c->has_looked_for_mfra) {
         c->has_looked_for_mfra = 1;
         if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
             int ret;
-- 
2.39.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to