diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-13 16:10:02 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-13 16:10:02 +0000 |
commit | 2aa6acd9747aec7f72ebea2addb9cdba98846d7a (patch) | |
tree | 7abd1a62bfd63988151fc2ab624a74d56dd18a18 /libmpdemux/network.c | |
parent | e61fb5349ab1c7e6ae2664ab5ee4d04bb3e8f92b (diff) | |
download | mpv-2aa6acd9747aec7f72ebea2addb9cdba98846d7a.tar.bz2 mpv-2aa6acd9747aec7f72ebea2addb9cdba98846d7a.tar.xz |
Seek in HTTP streams and stdin seek fixes
Patch by eviv bulgroz <ebulgroz(at)yahoo(dot)com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12019 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/network.c')
-rw-r--r-- | libmpdemux/network.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpdemux/network.c b/libmpdemux/network.c index 455130dd83..6597434411 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -754,7 +754,11 @@ extension=NULL; streaming_ctrl->data = (void*)http_hdr; // Check if we can make partial content requests and thus seek in http-streams - seekable=(http_hdr!=NULL && http_hdr->status_code==200 && strncmp(http_get_field(http_hdr,"Accept-Ranges"),"bytes",5)==0); + if( http_hdr!=NULL && http_hdr->status_code==200 ) { + char *accept_ranges; + if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL ) + seekable = strncmp(accept_ranges,"bytes",5)==0; + } // Check if the response is an ICY status_code reason_phrase if( !strcasecmp(http_hdr->protocol, "ICY") ) { |