[MPlayer-cvslog] r25168 - trunk/asxparser.c

reimar subversion at mplayerhq.hu
Mon Nov 26 20:04:31 CET 2007


Author: reimar
Date: Mon Nov 26 20:04:31 2007
New Revision: 25168

Log:
Replace http:// URLs in asx files by mmshttp://.
Avoid some infinite-loop problems when stream and playlist have the same URL.


Modified:
   trunk/asxparser.c

Modified: trunk/asxparser.c
==============================================================================
--- trunk/asxparser.c	(original)
+++ trunk/asxparser.c	Mon Nov 26 20:04:31 2007
@@ -448,6 +448,14 @@ asx_parse_ref(ASX_Parser_t* parser, char
     asx_warning_attrib_required(parser,"REF" ,"HREF" );
     return;
   }
+  // replace http my mmshttp to avoid infinite loops
+  if (strncmp(href, "http://", 7) == 0) {
+    char *newref = malloc(3 + strlen(href) + 1);
+    strcpy(newref, "mms");
+    strcpy(newref + 3, href);
+    free(href);
+    href = newref;
+  }
 
   play_tree_add_file(pt,href);
 



More information about the MPlayer-cvslog mailing list