Replace http:// URLs in asx files by mmshttp://.

Avoid some infinite-loop problems when stream and playlist have the same URL.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25168 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-11-26 19:04:31 +00:00
parent a4533bdb84
commit b32b64d559
1 changed files with 8 additions and 0 deletions

View File

@ -448,6 +448,14 @@ asx_parse_ref(ASX_Parser_t* parser, char** attribs, play_tree_t* pt) {
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);