diff options
author | wm4 <wm4@nowhere> | 2013-05-18 17:44:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-18 17:45:54 +0200 |
commit | d1b37aff32f459e2d9fd8361beb14138458012ec (patch) | |
tree | 37075bee45e30b30efddc7ce400fc9e2f315f573 /core | |
parent | 6b4288179194d2d76534a48fb631f94c7f861619 (diff) | |
download | mpv-d1b37aff32f459e2d9fd8361beb14138458012ec.tar.bz2 mpv-d1b37aff32f459e2d9fd8361beb14138458012ec.tar.xz |
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.)
Diffstat (limited to 'core')
-rw-r--r-- | core/m_option.c | 8 |
1 files changed, 3 insertions, 5 deletions
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); |