mirror of https://github.com/mpv-player/mpv
Add a hack for broken youtube servers not returning Accept-Ranges.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30145 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e25e6ec309
commit
c97d19eb49
|
@ -770,6 +770,8 @@ static int http_streaming_start(stream_t *stream, int* file_format) {
|
||||||
char *accept_ranges;
|
char *accept_ranges;
|
||||||
if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL )
|
if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL )
|
||||||
seekable = strncmp(accept_ranges,"bytes",5)==0;
|
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);
|
print_icy_metadata(http_hdr);
|
||||||
|
|
Loading…
Reference in New Issue