[MPlayer-dev-eng] [PATCH] convert http:// in asx to mmshttp://
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Nov 24 16:10:04 CET 2007
Hello,
currently http:// in asx playlists easily leads to endless loops.
Attached patch fixes this by explicitly changing the http to mmshttp in
asx playlists.
It might make sense to also try mmshttp first if the specified URL is
http, but that IMO is a bit of a different issue (and actually I don't
really like it since it means slowing down normal http:// streaming in
favour of a ugly proprietary (though admittedly popular) format).
Objections?
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: asxparser.c
===================================================================
--- asxparser.c (revision 25137)
+++ asxparser.c (working copy)
@@ -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);
More information about the MPlayer-dev-eng
mailing list