# HG changeset patch # User reimar # Date 1196103871 0 # Node ID 6b1f99f9b2f614fc32439f14f0fb28a5cae361a0 # Parent 94e618df1deac9086209ed98b7c98d3f34957f21 Replace http:// URLs in asx files by mmshttp://. Avoid some infinite-loop problems when stream and playlist have the same URL. diff -r 94e618df1dea -r 6b1f99f9b2f6 asxparser.c --- 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);