[MPlayer-cvslog] r25266 - trunk/stream/http.c

reimar subversion at mplayerhq.hu
Sun Dec 2 19:24:02 CET 2007


Author: reimar
Date: Sun Dec  2 19:24:01 2007
New Revision: 25266

Log:
Preserve unsv:// protocol specifier over http redirects.


Modified:
   trunk/stream/http.c

Modified: trunk/stream/http.c
==============================================================================
--- trunk/stream/http.c	(original)
+++ trunk/stream/http.c	Sun Dec  2 19:24:01 2007
@@ -836,6 +836,7 @@ static int http_streaming_start(stream_t
 				// TODO: RFC 2616, recommand to detect infinite redirection loops
 				next_url = http_get_field( http_hdr, "Location" );
 				if( next_url!=NULL ) {
+					int is_ultravox = strcasecmp(stream->streaming_ctrl->url->protocol, "unsv") == 0;
 					stream->streaming_ctrl->url = url_redirect( &url, next_url );
 					if (!strcasecmp(url->protocol, "mms")) {
 						res = STREAM_REDIRECTED;
@@ -845,6 +846,10 @@ static int http_streaming_start(stream_t
 						mp_msg(MSGT_NETWORK,MSGL_ERR,"Unsupported http %d redirect to %s protocol\n", http_hdr->status_code, url->protocol);
 						goto err_out;
 					}
+					if (is_ultravox)  {
+						free(url->protocol);
+						url->protocol = strdup("unsv");
+					}
 					redirect = 1;	
 				}
 				break;



More information about the MPlayer-cvslog mailing list