From d1b37aff32f459e2d9fd8361beb14138458012ec Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 18 May 2013 17:44:21 +0200 Subject: m_option: allow -vf "" With the current semantics, there's no reason to disallow this. (Although in my opinion, -vf should rather map to -vf-add than -vf-set, however that is an independent issue from this change.) --- core/m_option.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/m_option.c b/core/m_option.c index 6e02c537ad..2f6160c538 100644 --- a/core/m_option.c +++ b/core/m_option.c @@ -2177,9 +2177,6 @@ static int parse_obj_settings_list(const m_option_t *opt, struct bstr name, return obj_settings_list_del(name, param, dst); } - if (param.len == 0) - return M_OPT_MISSING_PARAM; - if (!bstrcmp0(param, "help")) { m_obj_list_t *ol = opt->priv; mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Available video filters:\n"); @@ -2207,8 +2204,9 @@ static int parse_obj_settings_list(const m_option_t *opt, struct bstr name, return M_OPT_INVALID; num++; } - if (num == 0) - return M_OPT_INVALID; + + if (op != OP_NONE && param.len == 0) + return M_OPT_MISSING_PARAM; if (dst) { m_obj_settings_t *list = VAL(dst); -- cgit v1.2.3