1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-14 02:51:26 +00:00

options: fix parsing for options/af and options/vf

Basically, the declared option name and the name passed to the
parse_obj_settings_list() must be the same.

Fixes the issue addressed in #1550, but differently.
This commit is contained in:
wm4 2015-02-03 13:40:55 +01:00
parent 9d62482cdc
commit 2c22fcd350

View File

@ -156,7 +156,10 @@ int m_property_do(struct mp_log *log, const struct m_property *prop_list,
case M_PROPERTY_SET_STRING: {
if (!log)
return M_PROPERTY_ERROR;
if (m_option_parse(log, &opt, bstr0(name), bstr0(arg), &val) < 0)
bstr optname = bstr0(name), a, b;
if (bstr_split_tok(optname, "/", &a, &b))
optname = b;
if (m_option_parse(log, &opt, optname, bstr0(arg), &val) < 0)
return M_PROPERTY_ERROR;
r = do_action(prop_list, name, M_PROPERTY_SET, &val, ctx);
m_option_free(&opt, &val);