diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-19 15:50:37 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-19 15:50:37 +0000 |
commit | 5c332bb3950856c09ad6fe3f89763aa9f1f896b2 (patch) | |
tree | ec4a9bb8d0445c37b11d8f1a16136947c901cb8a | |
parent | 1680e5e872396b5311967fa8ccca89697a0e2557 (diff) | |
download | mpv-5c332bb3950856c09ad6fe3f89763aa9f1f896b2.tar.bz2 mpv-5c332bb3950856c09ad6fe3f89763aa9f1f896b2.tar.xz |
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"
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18149 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | parser-mecmd.c | 2 | ||||
-rw-r--r-- | parser-mpcmd.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/parser-mecmd.c b/parser-mecmd.c index 9070f9890a..65eabdd85a 100644 --- a/parser-mecmd.c +++ b/parser-mecmd.c @@ -97,8 +97,10 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) 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 --git a/parser-mpcmd.c b/parser-mpcmd.c index 7f591cc87e..60c30b5117 100644 --- a/parser-mpcmd.c +++ b/parser-mpcmd.c @@ -199,6 +199,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) 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; |