PR #24292 opened by James Almer (jamrial)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24292
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24292.patch

Covers the fix from !24183.


>From 3694e8b15387001897cb7a63ca582d9cb53062d8 Mon Sep 17 00:00:00 2001
From: James Almer <[email protected]>
Date: Thu, 27 Aug 2026 12:05:24 -0300
Subject: [PATCH] tests/api/movenc: add a test for fragmented output with no
 samples

Covers the fix from 9f35e220ffbba21c88356eb2bbfa3679ede93793.

Signed-off-by: James Almer <[email protected]>
---
 tests/api/api-movenc-test.c | 7 +++++++
 tests/ref/fate/api-movenc   | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/tests/api/api-movenc-test.c b/tests/api/api-movenc-test.c
index 32268a45e7..39494748fd 100644
--- a/tests/api/api-movenc-test.c
+++ b/tests/api/api-movenc-test.c
@@ -417,6 +417,13 @@ int main(int argc, char **argv)
         return 1;
     }
 
+    // Write a fragmented file with an initial moov and no samples.
+    init_out("non-empty-moov-no-mdat");
+    av_dict_set(&opts, "movflags", "+frag_keyframe", 0);
+    init(0, 0);
+    finish();
+    close_out();
+
     // Write a fragmented file with an initial moov that actually contains some
     // samples. One moov+mdat with 1 second of data and one moof+mdat with 1
     // second of data.
diff --git a/tests/ref/fate/api-movenc b/tests/ref/fate/api-movenc
index 5ba8d4fd18..20996b8910 100644
--- a/tests/ref/fate/api-movenc
+++ b/tests/ref/fate/api-movenc
@@ -1,4 +1,8 @@
 write_data len 36, time nopts, type header atom ftyp
+write_data len 1123, time nopts, type header atom -
+write_data len 24, time nopts, type trailer atom -
+0f878d7b9767582011dfa104de94b1d9 1183 non-empty-moov-no-mdat
+write_data len 36, time nopts, type header atom ftyp
 write_data len 2429, time nopts, type header atom -
 write_data len 788, time 1000000, type sync atom moof
 write_data len 110, time nopts, type trailer atom -
-- 
2.52.0

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

Reply via email to