changeset 18148:280f93388ac3

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"
author reimar
date Wed, 19 Apr 2006 15:50:37 +0000
parents 0b0db513c5aa
children 163fe5c2577d
files parser-mecmd.c parser-mpcmd.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 {
--- 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;