mirror of https://github.com/mpv-player/mpv
player: remove special auto option from alang/slang/vlang
This proved to be too problematic. Depending on the value of --subs-with-matching-audio, you could either end up with cases where --slang wasn't respected and users didn't get subtitles or alternatively cases where subtitles were given and the user didn't ask for them. Fundamentally, the OS language functionality doesn't really map well to slang (and for alang/vlang it makes zero sense; not that anyone actually used it). Instead of trying to shove it in an option where it doesn't belong, we should split this off into something else. So for now, just remove the special handling of "auto" and flip slang back to NULL.
This commit is contained in:
parent
e1f9444d4d
commit
53d032374d
|
@ -43,6 +43,8 @@ Interface changes
|
|||
- add `--libplacebo-opts` option
|
||||
- change `--video-pan-x/y` to be relative to the destination rectangle
|
||||
- add `--audio-file-exts`, `--cover-art-auto-exts`, and `--sub-auto-exts`
|
||||
- change `slang` default back to NULL
|
||||
- remove special handling of the `auto` value from `--alang/slang/vlang` options
|
||||
--- mpv 0.36.0 ---
|
||||
- add `--target-contrast`
|
||||
- Target luminance value is now also applied when ICC profile is used.
|
||||
|
|
|
@ -11,9 +11,6 @@ Track Selection
|
|||
A track that matches more subtags will be preferred over one that matches fewer,
|
||||
with preference given to earlier subtags over later ones. See also ``--aid``.
|
||||
|
||||
The special value "auto" can be included anywhere in the list,
|
||||
and is equivalent to the user's OS-level list of preferred languages.
|
||||
|
||||
This is a string list option. See `List Options`_ for details.
|
||||
|
||||
.. admonition:: Examples
|
||||
|
@ -24,7 +21,7 @@ Track Selection
|
|||
audio.
|
||||
|
||||
``--slang=<languagecode[,languagecode,...]>``
|
||||
Equivalent to ``--alang``, for subtitle tracks (default: auto).
|
||||
Equivalent to ``--alang``, for subtitle tracks.
|
||||
|
||||
This is a string list option. See `List Options`_ for details.
|
||||
|
||||
|
|
|
@ -1042,9 +1042,6 @@ static const struct MPOpts mp_default_opts = {
|
|||
{ [STREAM_AUDIO] = -2,
|
||||
[STREAM_VIDEO] = -2,
|
||||
[STREAM_SUB] = -2, }, },
|
||||
.stream_lang = {
|
||||
[STREAM_SUB] = (char *[]){ "auto", NULL },
|
||||
},
|
||||
.stream_auto_sel = true,
|
||||
.subs_with_matching_audio = true,
|
||||
.subs_fallback = 1,
|
||||
|
|
|
@ -568,13 +568,8 @@ static char **process_langs(char **in)
|
|||
size_t nb = 0;
|
||||
char **out = NULL;
|
||||
for (int i = 0; in && in[i]; i++) {
|
||||
if (!strcmp(in[i], "auto")) {
|
||||
if (!add_auto_langs(&nb, &out))
|
||||
break;
|
||||
} else {
|
||||
if (!append_lang(&nb, &out, talloc_strdup(NULL, in[i])))
|
||||
break;
|
||||
}
|
||||
if (!append_lang(&nb, &out, talloc_strdup(NULL, in[i])))
|
||||
break;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue