changeset 25140:6b1f99f9b2f6

Replace http:// URLs in asx files by mmshttp://. Avoid some infinite-loop problems when stream and playlist have the same URL.
author reimar
date Mon, 26 Nov 2007 19:04:31 +0000
parents 94e618df1dea
children fba022abe464
files asxparser.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/asxparser.c	Mon Nov 26 19:01:34 2007 +0000
+++ b/asxparser.c	Mon Nov 26 19:04:31 2007 +0000
@@ -448,6 +448,14 @@
     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);