[Mplayer-cvslog] CVS: main asxparser.c,1.10,1.11

Alban Bedel CVS albeu at mplayerhq.hu
Sun Mar 30 19:02:32 CEST 2003


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

Modified Files:
	asxparser.c 
Log Message:
Remove STREAMTYPE_PLAYLIST.
Add support for quoting attribs vals with with '
Use new config headers


Index: asxparser.c
===================================================================
RCS file: /cvsroot/mplayer/main/asxparser.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- asxparser.c	14 Mar 2003 17:45:33 -0000	1.10
+++ asxparser.c	30 Mar 2003 17:02:05 -0000	1.11
@@ -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';
@@ -518,12 +519,6 @@
   stream=open_stream(href,0,&f);
   if(!stream) {
     mp_msg(MSGT_PLAYTREE,MSGL_WARN,"Can't open playlist %s\n",href);
-    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;
   }



More information about the MPlayer-cvslog mailing list