summaryrefslogtreecommitdiffstats
path: root/asxparser.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-26 19:04:31 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-26 19:04:31 +0000
commitb32b64d5596339ee8ac40427895c7e19d16e7027 (patch)
tree1e0761b7b13ea01d1a8d721577ce4e9f94ab8336 /asxparser.c
parenta4533bdb84c0740960a75df20d2aa6ea62f55f5e (diff)
downloadmpv-b32b64d5596339ee8ac40427895c7e19d16e7027.tar.bz2
mpv-b32b64d5596339ee8ac40427895c7e19d16e7027.tar.xz
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
Diffstat (limited to 'asxparser.c')
-rw-r--r--asxparser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/asxparser.c b/asxparser.c
index 4a1f922d14..ad9101a3d7 100644
--- a/asxparser.c
+++ b/asxparser.c
@@ -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);