# HG changeset patch # User albeu # Date 1142442973 0 # Node ID 1973600f8f3e9a6c0cba78700b3531ef5baea988 # Parent 1ea882991bb425f5796509f0d7aebbe48b09f1fe Small fix with object list (-vf) help. Tell the user when an object have no option description instead of falling back to the "normal" help, like with -vf pp=help. Don't display a useless error message when querying the help of an object option (as in -vf scale=presize=help). diff -r 1ea882991bb4 -r 1973600f8f3e m_option.c --- a/m_option.c Wed Mar 15 16:28:31 2006 +0000 +++ b/m_option.c Wed Mar 15 17:16:13 2006 +0000 @@ -1211,7 +1211,8 @@ } r = m_option_parse(opt,str,p,NULL,M_CONFIG_FILE); if(r < 0) { - mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,str,p); + if(r > M_OPT_EXIT) + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,str,p); eq[0] = '='; return r; } @@ -1229,7 +1230,8 @@ opt = &desc->fields[(*nold)]; r = m_option_parse(opt,opt->name,str,NULL,M_CONFIG_FILE); if(r < 0) { - mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,opt->name,str); + if(r > M_OPT_EXIT) + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: Error while parsing %s parameter %s (%s)\n",opt_name,obj_name,opt->name,str); return r; } if(dst) { @@ -1424,6 +1426,10 @@ if(param) { if(!desc && _ret) { + if(!strcmp(param,"help")) { + mp_msg(MSGT_CFGPARSER, MSGL_INFO, "Option %s: %s have no option description.\n",opt,str); + return M_OPT_EXIT - 1; + } plist = calloc(4,sizeof(char*)); plist[0] = strdup("_oldargs_"); plist[1] = strdup(param);