Commit 9d49ed18da for ffmpeg
commit 9d49ed18da753f0dac946401fd8b2b5615b2b581
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Tue Sep 29 22:57:17 2026 +0200
tests/fate/hlsenc: add a test for a large fMP4 init section
With 100 audio tracks the init section is about 50 KB, so the HLS
demuxer passes it on to the mov demuxer in more than one read.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/tests/fate/hlsenc.mak b/tests/fate/hlsenc.mak
index 360240baeb..26b029caf0 100644
--- a/tests/fate/hlsenc.mak
+++ b/tests/fate/hlsenc.mak
@@ -252,6 +252,19 @@ fate-hls-iframes-single-fmp4: CLEANFILES = tests/data/hls_iframes_single_fmp4.m3
fate-hls-iframes-single-fmp4: CMD = sed -n -e /^\#EXT-X-MAP:/p -e /^\#EXT-X-BYTERANGE:/p $(TARGET_PATH)/tests/data/hls_iframes_single_fmp4.m3u8
fate-hls-iframes-single-fmp4: CMP = diff
+tests/data/hls_fmp4_big_init.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+ $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin \
+ -filter_complex "aevalsrc=cos(2*PI*t)*sin(2*PI*(440+4*t)*t):d=2:s=16000,asplit=100" \
+ -codec:a mp2fixed -b:a 8k -bitexact -f hls -hls_time 1 -hls_list_size 0 \
+ -hls_segment_type fmp4 -hls_fmp4_init_filename hls_fmp4_big_init.mp4 \
+ -hls_segment_filename $(TARGET_PATH)/tests/data/hls_fmp4_big_init_%d.m4s \
+ $(TARGET_PATH)/tests/data/hls_fmp4_big_init.m3u8 2>/dev/null
+
+FATE_HLSENC_LAVFI-$(call ALLYES, AEVALSRC_FILTER ASPLIT_FILTER ARESAMPLE_FILTER MP2FIXED_ENCODER HLS_MUXER MP4_MUXER HLS_DEMUXER MOV_DEMUXER FILE_PROTOCOL) += fate-hls-fmp4-big-init
+fate-hls-fmp4-big-init: tests/data/hls_fmp4_big_init.m3u8
+fate-hls-fmp4-big-init: CLEANFILES = tests/data/hls_fmp4_big_init.m3u8 tests/data/hls_fmp4_big_init.mp4 tests/data/hls_fmp4_big_init_*.m4s
+fate-hls-fmp4-big-init: CMD = framecrc -i $(TARGET_PATH)/tests/data/hls_fmp4_big_init.m3u8 -map 0:a:99 -c copy
+
FATE_HLSENC_LAVFI-yes := $(if $(call FRAMECRC), $(FATE_HLSENC_LAVFI-yes))
FATE_FFMPEG += $(FATE_HLSENC_LAVFI-yes)
diff --git a/tests/ref/fate/hls-fmp4-big-init b/tests/ref/fate/hls-fmp4-big-init
new file mode 100644
index 0000000000..07a81414c6
--- /dev/null
+++ b/tests/ref/fate/hls-fmp4-big-init
@@ -0,0 +1,33 @@
+#tb 0: 1/16000
+#media_type 0: audio
+#codec_id 0: mp3
+#sample_rate 0: 16000
+#channel_layout_name 0: mono
+0, 0, 0, 1152, 72, 0x40951fab
+0, 1152, 1152, 1152, 72, 0xea491bfe
+0, 2304, 2304, 1152, 72, 0xdfe01d11
+0, 3456, 3456, 1152, 72, 0xd1e91c49
+0, 4608, 4608, 1152, 72, 0xd55e1db0
+0, 5760, 5760, 1152, 72, 0x21901f6a
+0, 6912, 6912, 1152, 72, 0xd6491d39
+0, 8064, 8064, 1152, 72, 0xaf081c07
+0, 9216, 9216, 1152, 72, 0x7aa61ab3
+0, 10368, 10368, 1152, 72, 0xc5ad1c08
+0, 11520, 11520, 1152, 72, 0x643f2013
+0, 12672, 12672, 1152, 72, 0xb12a1bd3
+0, 13824, 13824, 1152, 72, 0xa7de1caa
+0, 14976, 14976, 1152, 72, 0x00111dcc
+0, 16128, 16128, 1152, 72, 0xf7941ca0
+0, 17280, 17280, 1152, 72, 0xe8391df8
+0, 18432, 18432, 1152, 72, 0x541c191d
+0, 19584, 19584, 1152, 72, 0xeba51d36
+0, 20736, 20736, 1152, 72, 0x02cb1bc1
+0, 21888, 21888, 1152, 72, 0xa6fb1b52
+0, 23040, 23040, 1152, 72, 0xaae718e1
+0, 24192, 24192, 1152, 72, 0x09c11c28
+0, 25344, 25344, 1152, 72, 0xdbea1ae2
+0, 26496, 26496, 1152, 72, 0xbd111bb2
+0, 27648, 27648, 1152, 72, 0x9f301d31
+0, 28800, 28800, 1152, 72, 0xbe3c1ac6
+0, 29952, 29952, 1152, 72, 0x3cdd1fb6
+0, 31104, 31104, 1152, 72, 0x278e1725