diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 3e3437a394..bb60434419 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -137,7 +137,9 @@ Track Selection ``--subs-with-matching-audio=`` When autoselecting a subtitle track, select a full/non-forced one even if the selected - audio stream matches your preferred subtitle language (default: yes). + audio stream matches your preferred subtitle language (default: yes). If this option is + set to ``no``, a non-forced subtitle track that matches the audio language will never be + autoselected by mpv regardless of the value of ``--slang`` or ``--subs-fallback``. ``--subs-match-os-language=`` When autoselecting a subtitle track, select the track that matches the language of your OS diff --git a/player/loadfile.c b/player/loadfile.c index 3b03878e9a..b9c6786cdc 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -663,8 +663,10 @@ struct track *select_default_track(struct MPContext *mpctx, int order, sub_fallback = (pick->is_external && !pick->no_default) || opts->subs_fallback == 2 || (opts->subs_fallback == 1 && pick->default_track); } - if (pick && !forced_pick && sub && (!match_lang(langs, pick->lang) || os_langs) && - ((!opts->subs_with_matching_audio && audio_matches) || !sub_fallback)) + if (pick && !forced_pick && sub && (!match_lang(langs, pick->lang) || os_langs) && !sub_fallback) + pick = NULL; + // Handle this after matching langs and selecting a fallback. + if (pick && !forced_pick && sub && (!opts->subs_with_matching_audio && audio_matches)) pick = NULL; if (pick && pick->attached_picture && !mpctx->opts->audio_display)