mirror of
https://github.com/mpv-player/mpv
synced 2025-02-02 21:21:33 +00:00
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:
parent
a4533bdb84
commit
b32b64d559
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user