From 9ec605469a6f463ebdbaec5f444ad410e7bb743b Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Sat, 17 Jan 2026 20:51:57 +0100 Subject: [PATCH 01/10] player/loadfile: remove forced param from compare_track Use track->forced_select instead. The value would be assigned there anyway after the track is selected and the field is not used for any other purpose. --- player/loadfile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/player/loadfile.c b/player/loadfile.c index 75e248c073e99..aac8c82e32979 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -473,7 +473,7 @@ void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer) */ // Return whether t1 is preferred over t2 static bool compare_track(struct track *t1, struct track *t2, char **langs, bool os_langs, - bool forced, struct MPOpts *opts, int preferred_program) + struct MPOpts *opts, int preferred_program) { bool sub = t2->type == STREAM_SUB; if (!opts->autoload_files && t1->is_external != t2->is_external) @@ -496,7 +496,7 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs, bool int l1 = mp_match_lang(langs, t1->lang), l2 = mp_match_lang(langs, t2->lang); if (!os_langs && l1 != l2) return l1 > l2; - if (forced) + if (t1->forced_select) return t1->forced_track; if (t1->default_track != t2->default_track && !t2->forced_select) return t1->default_track; @@ -617,13 +617,13 @@ struct track *select_default_track(struct MPContext *mpctx, int order, (opts->subs_fallback == 1 && track->default_track); bool subs_matching_audio = (!mp_match_lang(langs, audio_lang) || opts->subs_with_matching_audio == 2 || (opts->subs_with_matching_audio == 1 && track->forced_track)); + track->forced_select = forced; if (subs_matching_audio && ((!pick && (forced || lang_match || subs_fallback)) || - (pick && compare_track(track, pick, langs, os_langs, forced, mpctx->opts, preferred_program)))) + (pick && compare_track(track, pick, langs, os_langs, mpctx->opts, preferred_program)))) { pick = track; - pick->forced_select = forced; } - } else if (!pick || compare_track(track, pick, langs, os_langs, false, mpctx->opts, preferred_program)) { + } else if (!pick || compare_track(track, pick, langs, os_langs, mpctx->opts, preferred_program)) { pick = track; } } From 361cbb401a6c509caf870e61828c05cb53af233d Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Sat, 17 Jan 2026 21:09:19 +0100 Subject: [PATCH 02/10] player/loadfile: clean up track comparison logic This brings compare_track closer to implementing a consistent linear order and fixes many broken edge cases. --- player/loadfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/player/loadfile.c b/player/loadfile.c index aac8c82e32979..831d56edc1db4 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -496,11 +496,11 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs, bool int l1 = mp_match_lang(langs, t1->lang), l2 = mp_match_lang(langs, t2->lang); if (!os_langs && l1 != l2) return l1 > l2; - if (t1->forced_select) - return t1->forced_track; - if (t1->default_track != t2->default_track && !t2->forced_select) + if (t1->forced_select != t2->forced_select) + return t1->forced_select; + if (t1->default_track != t2->default_track) return t1->default_track; - if (sub && !t2->forced_select && t2->forced_track) + if (sub && t1->forced_track != t2->forced_track) return !t1->forced_track; if (os_langs && l1 != l2) return l1 > l2; From abd38aadaf263a03673a76fccad771608ede7b02 Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Sat, 17 Jan 2026 21:16:10 +0100 Subject: [PATCH 03/10] player/loadfile: simplify track selection logic This fixes the problem that a subtitle track that normally wouldn't be selected if it were the only track available could end up being selected after a different candidate track was selected first. --- player/loadfile.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/player/loadfile.c b/player/loadfile.c index 831d56edc1db4..f22441ae5f7a6 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -617,13 +617,13 @@ struct track *select_default_track(struct MPContext *mpctx, int order, (opts->subs_fallback == 1 && track->default_track); bool subs_matching_audio = (!mp_match_lang(langs, audio_lang) || opts->subs_with_matching_audio == 2 || (opts->subs_with_matching_audio == 1 && track->forced_track)); + if (!subs_matching_audio) + continue; + if (!forced && !lang_match && !subs_fallback) + continue; track->forced_select = forced; - if (subs_matching_audio && ((!pick && (forced || lang_match || subs_fallback)) || - (pick && compare_track(track, pick, langs, os_langs, mpctx->opts, preferred_program)))) - { - pick = track; - } - } else if (!pick || compare_track(track, pick, langs, os_langs, mpctx->opts, preferred_program)) { + } + if (!pick || compare_track(track, pick, langs, os_langs, mpctx->opts, preferred_program)) { pick = track; } } From c2884e02f18f1c6439749e5517ffcf981ebe5dde Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Sat, 17 Jan 2026 21:30:18 +0100 Subject: [PATCH 04/10] player/loadfile: simplify how external tracks are excluded When autoload-files=no, external files are never selected. Simplify the logic by excluding them up front instead of removing them afterwards. This doesn't change the outcome of track selection, apart from edge cases that are already broken because compare_track is not transitive. --- player/loadfile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/player/loadfile.c b/player/loadfile.c index f22441ae5f7a6..9dc5d7144d78f 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -476,8 +476,6 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs, bool struct MPOpts *opts, int preferred_program) { bool sub = t2->type == STREAM_SUB; - if (!opts->autoload_files && t1->is_external != t2->is_external) - return !t1->is_external; bool ext1 = t1->is_external && !t1->no_default; bool ext2 = t2->is_external && !t2->no_default; if (ext1 != ext2) { @@ -605,6 +603,8 @@ struct track *select_default_track(struct MPContext *mpctx, int order, continue; if (track->no_auto_select) continue; + if (!opts->autoload_files && track->is_external) + continue; if (duplicate_track(mpctx, order, type, track)) continue; if (sub) { @@ -630,8 +630,6 @@ struct track *select_default_track(struct MPContext *mpctx, int order, if (pick && pick->attached_picture && !mpctx->opts->audio_display) pick = NULL; - if (pick && !opts->autoload_files && pick->is_external) - pick = NULL; cleanup: talloc_free(langs); return pick; From 13bf3b91402eff2bf493010e4d4938b190ae989a Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Sun, 18 Jan 2026 11:34:26 +0100 Subject: [PATCH 05/10] test/libmpv_test_track_selection: add additional multilang test case The new test case exercises --subs-fallback-forced=always and verifies that default+forced is preferred over forced. --- test/libmpv_test_track_selection.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/libmpv_test_track_selection.c b/test/libmpv_test_track_selection.c index 8775669d00057..148063fbfb44a 100644 --- a/test/libmpv_test_track_selection.c +++ b/test/libmpv_test_track_selection.c @@ -205,6 +205,15 @@ static void test_track_selection(char *file, char *path) reload_file(path); check_string("current-tracks/audio/lang", "ger"); check_string("current-tracks/sub/lang", "jpn"); + + // default+forced eng subs should be selected + set_property_string("alang", "jpn"); + set_property_string("slang", ""); + set_property_string("subs-with-matching-audio", "yes"); + set_property_string("subs-fallback-forced", "always"); + reload_file(path); + check_string("current-tracks/audio/lang", "jpn"); + check_string("current-tracks/sub/lang", "eng"); } else if (strcmp(file, "multilang2.mkv") == 0) { // default jpn subs set_property_string("subs-match-os-language", "no"); From 9d07e0e157f8ec60ae96fad8b77350afcfec6227 Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Sun, 18 Jan 2026 12:02:26 +0100 Subject: [PATCH 06/10] test/libmpv_test_track_selection: add a locale test with forced tracks This is a copy of the existing locale test, but with forced flag added to all tracks. The forced flag should not affect language selection in this case. --- test/libmpv_test_track_selection.c | 7 +++++-- test/samples/meson.build | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/libmpv_test_track_selection.c b/test/libmpv_test_track_selection.c index 148063fbfb44a..619c0243397d9 100644 --- a/test/libmpv_test_track_selection.c +++ b/test/libmpv_test_track_selection.c @@ -137,7 +137,8 @@ static void test_track_selection(char *file, char *path) set_property_string("subs-fallback", "yes"); reload_file(path); check_string("current-tracks/sub/selected", "yes"); - } else if (strcmp(file, "locale.mkv") == 0) { + } else if (strcmp(file, "locale.mkv") == 0 || + strcmp(file, "locale_forced.mkv") == 0) { // default english subs reload_file(path); check_string("current-tracks/sub/lang", "eng"); @@ -257,7 +258,9 @@ int main(int argc, char *argv[]) if (argc < 3) return 1; - if (!strcmp(argv[1], "locale.mkv") && !have_english_locale()) { + const char *locale_test_prefix = "locale"; + if (strncmp(argv[1], locale_test_prefix, strlen(locale_test_prefix)) == 0 && + !have_english_locale()) { printf("Non English language detected. Skipping locale test.\n"); return 77; } diff --git a/test/samples/meson.build b/test/samples/meson.build index 2b5756e880dd4..89e2c5fec398d 100644 --- a/test/samples/meson.build +++ b/test/samples/meson.build @@ -40,6 +40,11 @@ samples = { '-c', 'copy', '-map', '0:0', '-map', '1:0', '-map', '2:0', '-map', '3:0', '-metadata:s:s:0', 'language=ger', '-metadata:s:s:1', 'language=eng', '-disposition:s:0', 'default', '-disposition:s:1', 'default', '@OUTPUT@'], + 'locale_forced.mkv': + [ffmpeg, '-v', 'error', '-y', '-i', video, '-i', audio, '-f', 'srt', '-i', sub, '-i', sub, + '-c', 'copy', '-map', '0:0', '-map', '1:0', '-map', '2:0', '-map', '3:0', '-metadata:s:s:0', + 'language=ger', '-metadata:s:s:1', 'language=eng', '-disposition:s:0', 'default+forced', + '-disposition:s:1', 'default+forced', '@OUTPUT@'], 'multilang.mkv': [ffmpeg, '-v', 'error', '-y', '-i', video, '-i', audio, '-i', audio, '-i', audio, '-i', audio, '-f', 'srt', '-i', sub, '-i', sub, '-i', sub, '-i', sub, '-c', 'copy', '-map', '0:0', @@ -65,7 +70,7 @@ foreach name, cmd: samples depends: [video, audio], command: cmd, ) - env = name == 'locale.mkv' ? 'LANG=C' : [] + env = name.startswith('locale') ? 'LANG=C' : [] testname = 'libmpv-test-' + name exe = executable(testname, '../libmpv_test_track_selection.c', include_directories: incdir, dependencies: libmpv_dep) From 256f6cfbcc5a39628ec9a9ad16506e135c8fbe81 Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Tue, 20 Jan 2026 04:53:07 +0100 Subject: [PATCH 07/10] test/libmpv_test_track_selection: add a more complex locale test The purpose of this test is mostly to verify that matching the OS language is not wrongly prioritized over other things (like the forced flag, matching the audio language, etc). --- test/libmpv_test_track_selection.c | 54 ++++++++++++++++++++++++++++++ test/samples/meson.build | 10 ++++++ 2 files changed, 64 insertions(+) diff --git a/test/libmpv_test_track_selection.c b/test/libmpv_test_track_selection.c index 619c0243397d9..07482a07c61b0 100644 --- a/test/libmpv_test_track_selection.c +++ b/test/libmpv_test_track_selection.c @@ -147,6 +147,60 @@ static void test_track_selection(char *file, char *path) set_property_string("subs-match-os-language", "no"); reload_file(path); check_string("current-tracks/sub/lang", "ger"); + } else if (strcmp(file, "locale_complex.mkv") == 0) { + set_property_string("subs-fallback", "yes"); + set_property_string("subs-match-os-language", "yes"); + + // default+forced eng subs to match audio + set_property_string("alang", "eng"); + reload_file(path); + check_string("current-tracks/audio/lang", "eng"); + check_string("current-tracks/sub/lang", "eng"); + // among all eng subs, track 4 should be selected + check_int("current-tracks/sub/id", 4); + + // forced jpn subs to match audio + set_property_string("alang", "jpn"); + reload_file(path); + check_string("current-tracks/audio/lang", "jpn"); + check_string("current-tracks/sub/lang", "jpn"); + + // default, non-forced ger subs + set_property_string("alang", "ger"); + reload_file(path); + check_string("current-tracks/audio/lang", "ger"); + check_string("current-tracks/sub/lang", "ger"); + + // default+forced pol subs to match audio + set_property_string("alang", "pol"); + reload_file(path); + check_string("current-tracks/audio/lang", "pol"); + check_string("current-tracks/sub/lang", "pol"); + + // default+forced pol subs (first default track) + set_property_string("subs-match-os-language", "no"); + set_property_string("subs-fallback-forced", "always"); + reload_file(path); + check_string("current-tracks/sub/lang", "pol"); + + // default+forced eng subs to match OS lang + set_property_string("subs-match-os-language", "yes"); + reload_file(path); + check_string("current-tracks/sub/lang", "eng"); + // among all eng subs, track 4 should be selected + check_int("current-tracks/sub/id", 4); + + // default, non-forced ger subs + set_property_string("subs-fallback-forced", "no"); + reload_file(path); + check_string("current-tracks/sub/lang", "ger"); + + // default+forced eng subs to match slang + set_property_string("slang", "eng"); + reload_file(path); + check_string("current-tracks/sub/lang", "eng"); + // among all eng subs, track 4 should be selected + check_int("current-tracks/sub/id", 4); } else if (strcmp(file, "multilang.mkv") == 0) { // --alang=jpn should select forced jpn subs set_property_string("alang", "jpn"); diff --git a/test/samples/meson.build b/test/samples/meson.build index 89e2c5fec398d..400ec5c015f93 100644 --- a/test/samples/meson.build +++ b/test/samples/meson.build @@ -45,6 +45,16 @@ samples = { '-c', 'copy', '-map', '0:0', '-map', '1:0', '-map', '2:0', '-map', '3:0', '-metadata:s:s:0', 'language=ger', '-metadata:s:s:1', 'language=eng', '-disposition:s:0', 'default+forced', '-disposition:s:1', 'default+forced', '@OUTPUT@'], + 'locale_complex.mkv': + [ffmpeg, '-v', 'error', '-y', '-i', video, '-i', audio, '-f', 'srt', '-i', sub, '-c', 'copy', + '-map', '0:0', '-map', '1:0', '-map', '1:0', '-map', '1:0', '-map', '1:0', + '-map', '2:0', '-map', '2:0', '-map', '2:0', '-map', '2:0', '-map', '2:0', '-map', '2:0', + '-metadata:s:a:0', 'language=eng', '-metadata:s:a:1', 'language=jpn', + '-metadata:s:a:2', 'language=ger', '-metadata:s:a:3', 'language=pol', + '-metadata:s:s:0', 'language=eng', '-metadata:s:s:1', 'language=jpn', '-metadata:s:s:2', 'language=pol', + '-metadata:s:s:3', 'language=eng', '-metadata:s:s:4', 'language=ger', '-metadata:s:s:5', 'language=eng', + '-disposition:s:1', 'forced', '-disposition:s:2', 'default+forced', '-disposition:s:3', 'default+forced', + '-disposition:s:4', 'default', '-disposition:s:5', 'default+forced', '@OUTPUT@'], 'multilang.mkv': [ffmpeg, '-v', 'error', '-y', '-i', video, '-i', audio, '-i', audio, '-i', audio, '-i', audio, '-f', 'srt', '-i', sub, '-i', sub, '-i', sub, '-i', sub, '-c', 'copy', '-map', '0:0', From df08c404185526337f95a69661b56a1b6a27e2b3 Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Tue, 20 Jan 2026 06:43:57 +0100 Subject: [PATCH 08/10] test/libmpv_test_track_selection: add a program ID matching test --- test/libmpv_test_track_selection.c | 22 ++++++++++++++++++++++ test/samples/img_sub.idx | 16 ++++++++++++++++ test/samples/img_sub.sub | Bin 0 -> 4096 bytes test/samples/meson.build | 6 ++++++ 4 files changed, 44 insertions(+) create mode 100644 test/samples/img_sub.idx create mode 100644 test/samples/img_sub.sub diff --git a/test/libmpv_test_track_selection.c b/test/libmpv_test_track_selection.c index 07482a07c61b0..ad1e8f7b59836 100644 --- a/test/libmpv_test_track_selection.c +++ b/test/libmpv_test_track_selection.c @@ -304,6 +304,28 @@ static void test_track_selection(char *file, char *path) set_property_string("sid", "3"); reload_file(path); check_string("track-list/5/selected", "yes"); + } else if (strcmp(file, "multiprogram.ts") == 0) { + set_property_string("subs-match-os-language", "no"); + set_property_string("vid", "2"); + + // no subs are selected by default + reload_file(path); + check_string("track-list/1/selected", "no"); + check_string("track-list/3/selected", "no"); + + // because subs-fallback=default, the jpn track cannot be chosen + // so we choose the eng track despite it having the wrong program ID + set_property_string("slang", "eng"); + reload_file(path); + check_string("current-tracks/sub/lang", "eng"); + check_string("track-list/1/selected", "yes"); + + // the jpn track is selected to match video program ID + // even though the user requested eng subtitles + set_property_string("subs-fallback", "yes"); + reload_file(path); + check_string("current-tracks/sub/lang", "jpn"); + check_string("track-list/3/selected", "yes"); } } diff --git a/test/samples/img_sub.idx b/test/samples/img_sub.idx new file mode 100644 index 0000000000000..ab75f25b7b6f0 --- /dev/null +++ b/test/samples/img_sub.idx @@ -0,0 +1,16 @@ +# VobSub index file, v7 (do not modify this line!) +size: 1280x720 +org: 0, 0 +scale: 100%, 100% +alpha: 100% +smooth: OFF +fadein/out: 50, 50 +align: OFF at LEFT TOP +time offset: 0 +forced subs: OFF +palette: 000000, ffffff, 000000, 000000, 828282, 828282, 828282, ffffff, 828282, bababa, 828282, 828282, 828282, 828282, 828282, 828282 +custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, 000000 +langidx: 0 +id: en, index: 0 +timestamp: 00:00:00:000, filepos: 000000000 +timestamp: 00:00:01:000, filepos: 000000800 diff --git a/test/samples/img_sub.sub b/test/samples/img_sub.sub new file mode 100644 index 0000000000000000000000000000000000000000..ac3c6934c6898e3b35704c7d2625faa93dd334e7 GIT binary patch literal 4096 zcmZQzVBF=xbfk%8C1dB|9}EnPdl~jLHn1u(FfuSIFl=U+%5mUSZ5bQGv55~N+zP{= z3s!X%im&mTs6J6Wd^r#=IW|#KYSzS+4}kQG%#|-Pfs9O{(mJ5jgJb)=3dN-g#l=K~ z4z18~5Rd~JQz-r*!f$e-<3k3ZY0D+6+zO|!0BSAFTv-Uxsww0)YoZE>1vGl)av*+i zY#vaJ5D*<)q38630R+}EG8+l7{QtnJ_Gp5((NQ)A76!ln4B-rGnf?QPu#a8q|0oy@ zfzc2c4S~@R7!85Z5Wo`x!1@xs{$B;I|5^7dDljZ$Xy!Q3R$9i+&~}flp-mQ4`KM$r z4^L^ks2;9VT6JBl?P8`<dv3Fer0yL6iLVs81!QciElj@-RQg6h&%xDFW;Ld6HE?&1$nQE&yttS9t5929OKUt5^pztD))usIq66jal1!fol8N e(AwSxkM~BUMnhmU1V%$(Gz3ONU^E1 Date: Fri, 23 Jan 2026 21:05:00 +0100 Subject: [PATCH 09/10] player/loadfile: never autoselect tracks with wrong PID Currently, we prefer selecting a track that matches the video program ID, but can fall back on a track with a different program ID when there is no such track or when no such track matches subs-fallback criteria. Change this to instead select no track when only tracks with wrong PID are available. Program ID will now act as a filter, not as a preference, and only files with either matching or unset PID will be considered for autoselect. Also, ignore the program ID of external tracks, as it doesn't make much sense to compare PIDs from different files. --- player/loadfile.c | 12 +++++------- test/libmpv_test_track_selection.c | 9 +++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/player/loadfile.c b/player/loadfile.c index 9dc5d7144d78f..6fd0f318d5874 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -473,7 +473,7 @@ void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer) */ // Return whether t1 is preferred over t2 static bool compare_track(struct track *t1, struct track *t2, char **langs, bool os_langs, - struct MPOpts *opts, int preferred_program) + struct MPOpts *opts) { bool sub = t2->type == STREAM_SUB; bool ext1 = t1->is_external && !t1->no_default; @@ -486,11 +486,6 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs, bool } if (t1->auto_loaded != t2->auto_loaded) return !t1->auto_loaded; - if (preferred_program != -1 && t1->program_id != -1 && t2->program_id != -1) { - if ((t1->program_id == preferred_program) != - (t2->program_id == preferred_program)) - return t1->program_id == preferred_program; - } int l1 = mp_match_lang(langs, t1->lang), l2 = mp_match_lang(langs, t2->lang); if (!os_langs && l1 != l2) return l1 > l2; @@ -605,6 +600,9 @@ struct track *select_default_track(struct MPContext *mpctx, int order, continue; if (!opts->autoload_files && track->is_external) continue; + if (preferred_program != -1 && !track->is_external && + track->program_id != -1 && track->program_id != preferred_program) + continue; if (duplicate_track(mpctx, order, type, track)) continue; if (sub) { @@ -623,7 +621,7 @@ struct track *select_default_track(struct MPContext *mpctx, int order, continue; track->forced_select = forced; } - if (!pick || compare_track(track, pick, langs, os_langs, mpctx->opts, preferred_program)) { + if (!pick || compare_track(track, pick, langs, os_langs, mpctx->opts)) { pick = track; } } diff --git a/test/libmpv_test_track_selection.c b/test/libmpv_test_track_selection.c index ad1e8f7b59836..aebd8dbab438b 100644 --- a/test/libmpv_test_track_selection.c +++ b/test/libmpv_test_track_selection.c @@ -313,12 +313,13 @@ static void test_track_selection(char *file, char *path) check_string("track-list/1/selected", "no"); check_string("track-list/3/selected", "no"); - // because subs-fallback=default, the jpn track cannot be chosen - // so we choose the eng track despite it having the wrong program ID + // the eng track cannot be selected due to having the wrong program ID + // because subs-fallback=default, the jpn track cannot be chosen either + // so we get no subs set_property_string("slang", "eng"); reload_file(path); - check_string("current-tracks/sub/lang", "eng"); - check_string("track-list/1/selected", "yes"); + check_string("track-list/1/selected", "no"); + check_string("track-list/3/selected", "no"); // the jpn track is selected to match video program ID // even though the user requested eng subtitles From 9f7a3c393de1ced644bbb259cc786b6822a1967c Mon Sep 17 00:00:00 2001 From: Filip Hejsek Date: Fri, 23 Jan 2026 22:01:52 +0100 Subject: [PATCH 10/10] test/samples: use mpeg2 codec for video samples In CI, ffmpeg chooses vp9 by default, which cannot be muxed into mpegts. --- test/samples/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/samples/meson.build b/test/samples/meson.build index 5af5620fe8a89..bf88be8d39b79 100644 --- a/test/samples/meson.build +++ b/test/samples/meson.build @@ -2,7 +2,7 @@ video = custom_target('video.mkv', output: 'video.mkv', command: [ffmpeg, '-v', 'error', '-y', '-f', 'lavfi', '-i', - 'testsrc=duration=2:size=1280x720', '@OUTPUT@'], + 'testsrc=duration=2:size=1280x720', '-c:v', 'mpeg2video', '@OUTPUT@'], ) audio = custom_target('audio.flac',