Commit 636c9736c9 for ffmpeg
commit 636c9736c94219d18b081ea4c54a068a074a11e4
Author: James Almer <jamrial@gmail.com>
Date: Thu Dec 3 11:49:26 2026 -0300
tests/fate/matroska: add a test for multiple Edition entries
Ensure the second edition, marked as default and not hidden, is used.
No chapters from the first edition must be exported, nor should hidden chapters
from the used Edition.
Signed-off-by: James Almer <jamrial@gmail.com>
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 3f1f4b8d89..a4eaa32ac9 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -292,6 +292,11 @@ fate-matroska-dvbsub-remux: CMD = transcode mpegts $(TARGET_SAMPLES)/sub/dvbsubt
FATE_MATROSKA_FFPROBE-$(call DEMDEC, MATROSKA, H264) += fate-matroska-spherical-mono
fate-matroska-spherical-mono: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entries stream_side_data_list -select_streams v -v 0 $(TARGET_SAMPLES)/mkv/spherical.mkv
+# This tests that the matroska demuxer chooses the correct edition to export chapters,
+# and that hidden chapters are ignored.
+FATE_MATROSKA_FFPROBE-$(call FRAMECRC, MATROSKA) += fate-matroska-multiple-editions
+fate-matroska-multiple-editions: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_chapters -of compact -v 0 $(TARGET_SAMPLES)/mkv/multiple_editions.mkv
+
# This test tests the handling of AVStereo3D information, in particular
# the ability to set it via metadata in the muxer (the file itself is
# actually an ordinary file with a single view). It also tests
diff --git a/tests/ref/fate/matroska-multiple-editions b/tests/ref/fate/matroska-multiple-editions
new file mode 100644
index 0000000000..2202f92bbe
--- /dev/null
+++ b/tests/ref/fate/matroska-multiple-editions
@@ -0,0 +1,3 @@
+chapter|id=6|time_base=1/1000000000|start=0|start_time=0.000000|end=1000000000|end_time=1.000000
+chapter|id=7|time_base=1/1000000000|start=1000000000|start_time=1.000000|end=4000000000|end_time=4.000000
+chapter|id=9|time_base=1/1000000000|start=4000000000|start_time=4.000000|end=5000000000|end_time=5.000000