Mercurial > mplayer.hg
changeset 9744:eceac82103f5
Remove STREAMTYPE_PLAYLIST.
Add support for quoting attribs vals with with '
Use new config headers
author | albeu |
---|---|
date | Sun, 30 Mar 2003 17:02:05 +0000 |
parents | 3d32e3e96b67 |
children | c79bcf85f68c |
files | asxparser.c |
diffstat | 1 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/asxparser.c Sun Mar 30 16:27:03 2003 +0000 +++ b/asxparser.c Sun Mar 30 17:02:05 2003 +0000 @@ -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 @@ 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 @@ 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);