summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-25 23:38:57 -0500
committerDudemanguy <random342@airmail.cc>2023-08-28 18:43:46 +0000
commit165f9e061f79e95a6297cf79e8cf5f2d42b71b4c (patch)
tree9e9e34d22b2913a8861eef1dccb565a57d828f74 /player/loadfile.c
parent58ec0630f545705f0300805a43ee24aa0dcb59d6 (diff)
downloadmpv-165f9e061f79e95a6297cf79e8cf5f2d42b71b4c.tar.bz2
mpv-165f9e061f79e95a6297cf79e8cf5f2d42b71b4c.tar.xz
player: add always to --subs-fallback-forced
In general, forced tracks should only be shown if they match the language of the audio. However some people do want them no matter what, so add an always option to this so such tracks are always selected.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 2a83f57241..cd528624f0 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -646,8 +646,10 @@ struct track *select_default_track(struct MPContext *mpctx, int order,
if (!pick || compare_track(track, pick, langs, os_langs, mpctx->opts, preferred_program))
pick = track;
- // We only try to autoselect forced tracks if they match the audio language and are subs
- if (fallback_forced && track->forced_track && mp_match_lang_single(audio_lang, track->lang) &&
+ // We only try to autoselect forced tracks if they match the audio language and are subs or
+ // if the user always wants forced sub tracks
+ if (fallback_forced && track->forced_track &&
+ (mp_match_lang_single(audio_lang, track->lang) || opts->subs_fallback_forced == 2) &&
(!forced_pick || compare_track(track, forced_pick, langs, os_langs, mpctx->opts, preferred_program)))
forced_pick = track;
}