diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-08 01:05:30 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-08 01:05:30 +0200 |
commit | 231b33a02fae95b260120349040106bfa34a3750 (patch) | |
tree | 23c4de0e6263b2d99966348d7003177b3b3e3740 /stream | |
parent | 52126e574c7872ca95e7974cfe5445421b74f24c (diff) | |
parent | 92cd6dc3e916ae4275ff05d2b238fc778cfbfc6b (diff) | |
download | mpv-231b33a02fae95b260120349040106bfa34a3750.tar.bz2 mpv-231b33a02fae95b260120349040106bfa34a3750.tar.xz |
Merge svn changes up to r30165
Diffstat (limited to 'stream')
-rw-r--r-- | stream/http.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/stream/http.c b/stream/http.c index 3ebfe03d05..117c531e4c 100644 --- a/stream/http.c +++ b/stream/http.c @@ -767,9 +767,12 @@ static int http_streaming_start(stream_t *stream, int* file_format) { // Check if we can make partial content requests and thus seek in http-streams if( http_hdr!=NULL && http_hdr->status_code==200 ) { - char *accept_ranges; - if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL ) + const char *accept_ranges = http_get_field(http_hdr,"Accept-Ranges"); + const char *server = http_get_field(http_hdr, "Server"); + if (accept_ranges) seekable = strncmp(accept_ranges,"bytes",5)==0; + else if (server && strcmp(server, "gvs 1.0") == 0) + seekable = 1; // HACK for youtube incorrectly claiming not to support seeking } print_icy_metadata(http_hdr); |