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:
wm4 2016-09-01 14:29:08 +02:00
parent 6b4f560f3c
commit 17dbb39dec
1 changed files with 1 additions and 1 deletions

View File

@ -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);
if (!co)
return M_OPT_UNKNOWN;
return m_config_find_negation_opt(config, &name) ? 0 : M_OPT_UNKNOWN;
if (bstr_endswith0(name, "-clr"))
return 0;
return m_option_required_params(co->opt);