summaryrefslogtreecommitdiffstats
path: root/asxparser.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-30 17:02:05 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-30 17:02:05 +0000
commit50f296d10a68c3913bee9521c55087dc01d2c8c3 (patch)
treec0604bbeba1f67bcd0259333e58bbc8a9a744235 /asxparser.c
parent1f205496a80ae97b1eda4bad9d5d7426370b6add (diff)
downloadmpv-50f296d10a68c3913bee9521c55087dc01d2c8c3.tar.bz2
mpv-50f296d10a68c3913bee9521c55087dc01d2c8c3.tar.xz
Remove STREAMTYPE_PLAYLIST.
Add support for quoting attribs vals with with ' Use new config headers git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9745 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'asxparser.c')
-rw-r--r--asxparser.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/asxparser.c b/asxparser.c
index f761ef8f65..a121f26cba 100644
--- a/asxparser.c
+++ b/asxparser.c
@@ -11,7 +11,7 @@
#include "libmpdemux/stream.h"
#include "asxparser.h"
#include "mp_msg.h"
-#include "cfgparser.h"
+#include "m_config.h"
extern m_config_t* mconfig;
@@ -193,18 +193,19 @@ asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs) {
attrib[ptr2-ptr1+1] = '\0';
ptr1 = strchr(ptr3,'"');
+ if(ptr1 == NULL || ptr1[1] == '\0') ptr1 = strchr(ptr3,'\'');
if(ptr1 == NULL || ptr1[1] == '\0') {
mp_msg(MSGT_PLAYTREE,MSGL_WARN,"At line %d : can't find attribute %s value",parser->line,attrib);
free(attrib);
break;
}
- ptr1++;
- ptr2 = strchr(ptr1,'"');
+ ptr2 = strchr(ptr1+1,ptr1[0]);
if (ptr2 == NULL) {
mp_msg(MSGT_PLAYTREE,MSGL_WARN,"At line %d : value of attribute %s isn't finished",parser->line,attrib);
free(attrib);
break;
}
+ ptr1++;
val = (char*)malloc(ptr2-ptr1+1);
strncpy(val,ptr1,ptr2-ptr1);
val[ptr2-ptr1] = '\0';
@@ -521,12 +522,6 @@ asx_parse_entryref(ASX_Parser_t* parser,char* buffer,char** _attribs) {
free(href);
return NULL;
}
- if(stream->type != STREAMTYPE_PLAYLIST) {
- mp_msg(MSGT_PLAYTREE,MSGL_WARN,"URL %s dont point to a playlist\n",href);
- free_stream(stream);
- free(href);
- return NULL;
- }
mp_msg(MSGT_PLAYTREE,MSGL_V,"Adding playlist %s to element entryref\n",href);