options: use designated initializer

shorter and more robust this way instead of inserting at an index by
manually counting.

the surrounding code also uses `[STREAM_*] = ..` so it's more consistent
as well.
This commit is contained in:
NRK 2023-06-30 03:55:47 +06:00 committed by sfan5
parent 40a1b0066e
commit 39957c251c
1 changed files with 1 additions and 3 deletions

View File

@ -1033,9 +1033,7 @@ static const struct MPOpts mp_default_opts = {
[STREAM_VIDEO] = -2, [STREAM_VIDEO] = -2,
[STREAM_SUB] = -2, }, }, [STREAM_SUB] = -2, }, },
.stream_lang = { .stream_lang = {
NULL, // video [STREAM_SUB] = (char**)(const char*[]) {"auto", NULL},
NULL, // audio
(char**)(const char*[]) {"auto", NULL} // subtitles
}, },
.stream_auto_sel = true, .stream_auto_sel = true,
.subs_with_matching_audio = false, .subs_with_matching_audio = false,