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

reimar subversion at mplayerhq.hu
Sun Mar 17 11:16:49 CET 2013


Author: reimar
Date: Sun Mar 17 11:16:49 2013
New Revision: 35987

Log:
Support broken icy-metaint response from QuickTime Streaming Server.

The full version string is "QuickTime Streaming Server 6.1.0/532".
It sends a HTTP response header that contains an MP3 header!
Fixes bug #2133.

Modified:
   trunk/stream/http.c

Modified: trunk/stream/http.c
==============================================================================
--- trunk/stream/http.c	Sun Mar 17 10:32:12 2013	(r35986)
+++ trunk/stream/http.c	Sun Mar 17 11:16:49 2013	(r35987)
@@ -428,6 +428,12 @@ http_response_parse( HTTP_header_t *http
 		while( *ptr!='\r' && *ptr!='\n' ) ptr++;
 		len = ptr-hdr_ptr;
 		if( len==0 ) break;
+		if (len > 16 && !strncasecmp(hdr_ptr + 4, "icy-metaint:", 12))
+		{
+			mp_msg(MSGT_NETWORK, MSGL_WARN, "Server sent a severely broken icy-metaint HTTP header!\n");
+			hdr_ptr += 4;
+			len -= 4;
+		}
 		field = realloc(field, len+1);
 		if( field==NULL ) {
 			mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MemAllocFailed);


More information about the MPlayer-cvslog mailing list