changeset 30103:f7af93ece976

Add a hack for broken youtube servers not returning Accept-Ranges.
author reimar
date Wed, 30 Dec 2009 20:50:03 +0000
parents 9b479e2f365d
children 8b7ff54da750
files stream/http.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/http.c	Wed Dec 30 19:37:19 2009 +0000
+++ b/stream/http.c	Wed Dec 30 20:50:03 2009 +0000
@@ -770,6 +770,8 @@
 		    char *accept_ranges;
 		    if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL )
 			seekable = strncmp(accept_ranges,"bytes",5)==0;
+		    else if (strcmp(http_get_field(http_hdr, "Server"), "gvs 1.0") == 0)
+			seekable = 1; // HACK for youtube incorrectly claiming not to support seeking
 		}
 
 		print_icy_metadata(http_hdr);