diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-06 23:49:37 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-28 18:43:46 +0000 |
commit | 58ec0630f545705f0300805a43ee24aa0dcb59d6 (patch) | |
tree | 515e7c57a4e68e5efdfedbe0b7e8fc7e635da52e /options | |
parent | fbe8f9919428a7ed24a61899bfd85bbb7680e389 (diff) | |
download | mpv-58ec0630f545705f0300805a43ee24aa0dcb59d6.tar.bz2 mpv-58ec0630f545705f0300805a43ee24aa0dcb59d6.tar.xz |
player: add --subs-match-os-language option
This is the replacement for the previous auto option for slang. It
behaves similar however it never overrides slang if that is set and will
instead try to pick the subtitle that matches the user's language if
appropriately flagged by the file.
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 2 | ||||
-rw-r--r-- | options/options.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c index 13fefd5f0d..14fb4039c0 100644 --- a/options/options.c +++ b/options/options.c @@ -522,6 +522,7 @@ static const m_option_t mp_opts[] = { {"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-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_BOOL(subs_fallback_forced)}, @@ -1044,6 +1045,7 @@ static const struct MPOpts mp_default_opts = { [STREAM_SUB] = -2, }, }, .stream_auto_sel = true, .subs_with_matching_audio = true, + .subs_match_os_language = true, .subs_fallback = 1, .subs_fallback_forced = true, .audio_display = 1, diff --git a/options/options.h b/options/options.h index 6f8c8a5998..52547183a2 100644 --- a/options/options.h +++ b/options/options.h @@ -268,6 +268,7 @@ typedef struct MPOpts { char **stream_lang[STREAM_TYPE_COUNT]; bool stream_auto_sel; bool subs_with_matching_audio; + bool subs_match_os_language; int subs_fallback; bool subs_fallback_forced; int audio_display; |