[Mplayer-cvslog] CVS: main playtreeparser.c,1.19,1.20

Alban Bedel CVS albeu at mplayerhq.hu
Sun Mar 30 19:10:38 CEST 2003


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

Modified Files:
	playtreeparser.c 
Log Message:
Use new config headers
Remove STREAMTYPE_PLAYLIST.


Index: playtreeparser.c
===================================================================
RCS file: /cvsroot/mplayer/main/playtreeparser.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- playtreeparser.c	6 Feb 2003 20:57:25 -0000	1.19
+++ playtreeparser.c	30 Mar 2003 17:10:35 -0000	1.20
@@ -11,7 +11,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include "cfgparser.h"
+#include "m_config.h"
 #include "playtree.h"
 #include "playtreeparser.h"
 #include "libmpdemux/stream.h"
@@ -456,7 +456,6 @@
 
 #ifdef MP_DEBUG
   assert(stream != NULL);
-//  assert(stream->type == STREAMTYPE_PLAYLIST);
 #endif
 
   p = play_tree_parser_new(stream,0);
@@ -517,24 +516,18 @@
 parse_playlist_file(char* file) {
   stream_t *stream;
   play_tree_t* ret;
-  int fd;
+  int f;
 
-  if(!strcmp(file,"-"))
-    fd = 0;
-  else
-    fd = open(file,O_RDONLY);
+  stream = open_stream(file,0,&f);
 
-  if(fd < 0) {
+  if(!stream) {
     mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Error while opening playlist file %s : %s\n",file,strerror(errno));
     return NULL;
   }
 
   mp_msg(MSGT_PLAYTREE,MSGL_V,"Parsing playlist file %s...\n",file);
 
-  stream = new_stream(fd,STREAMTYPE_PLAYLIST);
   ret = parse_playtree(stream,1);
-  if(close(fd) < 0)
-    mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Warning error while closing playlist file %s : %s\n",file,strerror(errno));
   free_stream(stream);
 
   play_tree_add_bpf(ret, file);



More information about the MPlayer-cvslog mailing list