# HG changeset patch # User reimar # Date 1145461837 0 # Node ID 280f93388ac3136ae42bb3375e34ffec044173e4 # Parent 0b0db513c5aacc5e9d2346f69ab5ff8570100cfe also print an error when parsing fails with M_OPT_INVALID or M_OPT_PARSER_ERR. fixes MPlayer exiting without message for e.g. "mplayer -ao" diff -r 0b0db513c5aa -r 280f93388ac3 parser-mecmd.c --- a/parser-mecmd.c Wed Apr 19 10:28:49 2006 +0000 +++ b/parser-mecmd.c Wed Apr 19 15:50:37 2006 +0000 @@ -97,8 +97,10 @@ opt_exit = 1; tmp = M_OPT_EXIT - tmp; } + else if(tmp < 0){ // mp_msg(MSGT_CFGPARSER, MSGL_ERR, "m_config_set_option() failed (%d)\n",tmp); + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing option on the command line: -%s\n",opt); goto err_out; } } else { diff -r 0b0db513c5aa -r 280f93388ac3 parser-mpcmd.c --- a/parser-mpcmd.c Wed Apr 19 10:28:49 2006 +0000 +++ b/parser-mpcmd.c Wed Apr 19 15:50:37 2006 +0000 @@ -199,6 +199,7 @@ tmp = M_OPT_EXIT - tmp; } else if (tmp < 0) { + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Error parsing option on the command line: -%s\n",opt); goto err_out; } i += tmp;