Mercurial > mplayer.hg
changeset 35893:6065fb95813e
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.
author | reimar |
---|---|
date | Sun, 17 Mar 2013 10:16:49 +0000 |
parents | a8c33658bd4e |
children | ae62be3d8de2 |
files | stream/http.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/http.c Sun Mar 17 09:32:12 2013 +0000 +++ b/stream/http.c Sun Mar 17 10:16:49 2013 +0000 @@ -428,6 +428,12 @@ 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);