mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 06:42:03 +00:00
m_option: deprecate multiple items for -add etc.
This is more confusing than it helps, and forces escaping more stuff. For example, for string lists we could remove all need for escaling with -add and -pre. The user can simply use multiple of those options.
This commit is contained in:
parent
e4bc563fd2
commit
4a084c0df8
@ -50,6 +50,8 @@ Interface changes
|
||||
(the compatibility hacks for this will be removed after this release)
|
||||
- remove property `vo-performance`, and add `vo-passes` as a more general
|
||||
replacement
|
||||
- deprecate passing multiple arguments to -add/-pre options (affects the
|
||||
vf/af commands too)
|
||||
--- mpv 0.25.0 ---
|
||||
- remove opengl-cb dxva2 dummy hwdec interop
|
||||
(see git "vo_opengl: remove dxva2 dummy hwdec backend")
|
||||
|
@ -1159,8 +1159,6 @@ static int str_list_del(struct mp_log *log, char **del, int n, void *dst)
|
||||
talloc_free(lst[idx]);
|
||||
lst[idx] = NULL;
|
||||
s--;
|
||||
if (i > 0)
|
||||
mp_warn(log, "Passing multiple -del arguments is deprecated!\n");
|
||||
}
|
||||
talloc_free(del);
|
||||
|
||||
@ -1282,6 +1280,11 @@ static int parse_str_list_impl(struct mp_log *log, const m_option_t *opt,
|
||||
res[n] = NULL;
|
||||
talloc_free(ptr);
|
||||
|
||||
if (op != OP_NONE && n > 1) {
|
||||
mp_warn(log, "Passing multiple arguments to %.*s is deprecated!\n",
|
||||
BSTR_P(name));
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
case OP_ADD:
|
||||
return str_list_add(res, n, dst, 0);
|
||||
@ -2976,6 +2979,11 @@ static int parse_obj_settings_list(struct mp_log *log, const m_option_t *opt,
|
||||
}
|
||||
}
|
||||
|
||||
if (op != OP_NONE && res && res[0].name && res[1].name) {
|
||||
mp_warn(log, "Passing more than 1 argument to %.*s is deprecated!\n",
|
||||
BSTR_P(name));
|
||||
}
|
||||
|
||||
if (dst) {
|
||||
m_obj_settings_t *list = VAL(dst);
|
||||
if (op == OP_PRE) {
|
||||
|
Loading…
Reference in New Issue
Block a user