summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-12-28 10:16:42 -0600
committerDudemanguy <random342@airmail.cc>2024-01-13 03:26:06 +0000
commit2ad96079e99b33e24c912f9b2f5129c1309abede (patch)
treedd297b38b4b967122e56b29869e22fd55b1d5e4d /options/options.c
parent871f7a152a3f0b3561a627d21f7417d10ac9c25c (diff)
downloadmpv-2ad96079e99b33e24c912f9b2f5129c1309abede.tar.bz2
mpv-2ad96079e99b33e24c912f9b2f5129c1309abede.tar.xz
player: add forced choice to subs-with-matching-audio
fe875083b3d30b06ef77745f40570e8f63afec2 confused things a bit and made --no-subs-with-matching-audio actually mean what it says: no subtitles if the languages match. However, the option actually meant no non-forced subtitles not no subtitles at all. This isn't really intuitive so instead of changing the behavior back to the old way (we already have a release since then), add a third option "forced" which is equivalent to the old meaning of --no-subs-with-matching audio. Fixes #13151.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/options/options.c b/options/options.c
index 9dc01b48b4..fcf2c9f1d0 100644
--- a/options/options.c
+++ b/options/options.c
@@ -585,7 +585,8 @@ static const m_option_t mp_opts[] = {
{"slang", OPT_STRINGLIST(stream_lang[STREAM_SUB])},
{"vlang", OPT_STRINGLIST(stream_lang[STREAM_VIDEO])},
{"track-auto-selection", OPT_BOOL(stream_auto_sel)},
- {"subs-with-matching-audio", OPT_BOOL(subs_with_matching_audio)},
+ {"subs-with-matching-audio", OPT_CHOICE(subs_with_matching_audio, {"no", 0},
+ {"forced", 1}, {"yes", 2})},
{"subs-match-os-language", OPT_BOOL(subs_match_os_language)},
{"subs-fallback", OPT_CHOICE(subs_fallback, {"no", 0}, {"default", 1}, {"yes", 2})},
{"subs-fallback-forced", OPT_CHOICE(subs_fallback_forced, {"no", 0},
@@ -984,7 +985,7 @@ static const struct MPOpts mp_default_opts = {
[STREAM_VIDEO] = -2,
[STREAM_SUB] = -2, }, },
.stream_auto_sel = true,
- .subs_with_matching_audio = true,
+ .subs_with_matching_audio = 2,
.subs_match_os_language = true,
.subs_fallback = 1,
.subs_fallback_forced = 1,