[Mplayer-cvslog] CVS: main cfgparser.c,1.45,1.46

Alban Bedel CVS albeu at mplayer.dev.hu
Thu Feb 28 14:47:13 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv17175

Modified Files:
	cfgparser.c 
Log Message:
New option use-stdin to use when stdin will be used as a file
Auto enable use-stdin when - is in the command line


Index: cfgparser.c
===================================================================
RCS file: /cvsroot/mplayer/main/cfgparser.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- cfgparser.c	20 Feb 2002 22:41:54 -0000	1.45
+++ cfgparser.c	28 Feb 2002 13:47:06 -0000	1.46
@@ -302,6 +302,10 @@
     if(!param)
       return ERR_MISSING_PARAM;
     entry = parse_playlist_file(param);
+    if(!entry) {
+      mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Playlist parsing failed: %s\n",param);
+      return 1;
+    }
   }
 
   if(! IS_RUNNING(config)) {
@@ -1009,6 +1013,8 @@
 		    play_tree_t* entry = play_tree_new();
 		    mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Adding file %s\n",argv[i]);
 		    play_tree_add_file(entry,argv[i]);
+		    if(strcasecmp(argv[i],"-") == 0)
+		      m_config_set_option(config,"use-stdin",NULL);
 		    /* opt is not an option -> treat it as a filename */
 		    UNSET_GLOBAL(config); // We start entry specific options
 		    if(config->last_entry == NULL)




More information about the MPlayer-cvslog mailing list