summaryrefslogtreecommitdiffstats
path: root/playtreeparser.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-30 17:10:36 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-30 17:10:36 +0000
commitc5c742302c5556624940964d319b7b7b88499825 (patch)
tree1c61a82302574852893d9e72d2dd7a29040daf6f /playtreeparser.c
parent2f0fdb59c0bcc7d9b7b550b19d418ae714dc7144 (diff)
downloadmpv-c5c742302c5556624940964d319b7b7b88499825.tar.bz2
mpv-c5c742302c5556624940964d319b7b7b88499825.tar.xz
Use new config headers
Remove STREAMTYPE_PLAYLIST. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9750 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'playtreeparser.c')
-rw-r--r--playtreeparser.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/playtreeparser.c b/playtreeparser.c
index 63da140782..aaf6873d58 100644
--- a/playtreeparser.c
+++ b/playtreeparser.c
@@ -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 @@ parse_playtree(stream_t *stream, int forced) {
#ifdef MP_DEBUG
assert(stream != NULL);
-// assert(stream->type == STREAMTYPE_PLAYLIST);
#endif
p = play_tree_parser_new(stream,0);
@@ -517,24 +516,18 @@ play_tree_t*
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);