mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
options: make --msglevel extend previous settings
Make it so --msglevel extends previous --msglevel uses, instead of overwriting them. Do this by literally appending the --msglevel option value to the previous one.
This commit is contained in:
parent
4833e92b54
commit
bd5e0a2ba2
@ -1335,9 +1335,16 @@ static int parse_msglevels(struct mp_log *log, const m_option_t *opt,
|
||||
}
|
||||
}
|
||||
|
||||
if (dst) {
|
||||
talloc_free(VAL(dst));
|
||||
VAL(dst) = bstrdup0(NULL, param);
|
||||
if (dst && param.len) {
|
||||
char *prev = VAL(dst);
|
||||
char *new;
|
||||
if (prev && prev[0]) {
|
||||
new = talloc_asprintf(NULL, "%s:%.*s", prev, BSTR_P(param));
|
||||
} else {
|
||||
new = bstrdup0(NULL, param);
|
||||
}
|
||||
talloc_free(prev);
|
||||
VAL(dst) = new;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user