mirror of https://github.com/mpv-player/mpv
m_config: fix "no-" option handling with sub-options
E.g. --vf=scale=no-arnd didn't work, because it didn't recognize no-arnd as flag option. The top-level command line parser is not affected by this, because it uses the result of m_config_option_requires_param() differently and assumes unknown parameters do not necessarily require a parameter. (The suboption parser can't do this.)
This commit is contained in:
parent
6b4f560f3c
commit
17dbb39dec
|
@ -729,7 +729,7 @@ int m_config_option_requires_param(struct m_config *config, bstr name)
|
||||||
{
|
{
|
||||||
struct m_config_option *co = m_config_get_co(config, name);
|
struct m_config_option *co = m_config_get_co(config, name);
|
||||||
if (!co)
|
if (!co)
|
||||||
return M_OPT_UNKNOWN;
|
return m_config_find_negation_opt(config, &name) ? 0 : M_OPT_UNKNOWN;
|
||||||
if (bstr_endswith0(name, "-clr"))
|
if (bstr_endswith0(name, "-clr"))
|
||||||
return 0;
|
return 0;
|
||||||
return m_option_required_params(co->opt);
|
return m_option_required_params(co->opt);
|
||||||
|
|
Loading…
Reference in New Issue