mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
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
This commit is contained in:
parent
1680e5e872
commit
5c332bb395
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user