changeset 30106:e0d36dce5d85

Make code slightly more readable.
author reimar
date Thu, 31 Dec 2009 16:47:53 +0000
parents 31b7d4637b50
children 11e3ee8cd05e
files stream/http.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stream/http.c	Thu Dec 31 16:46:44 2009 +0000
+++ b/stream/http.c	Thu Dec 31 16:47:53 2009 +0000
@@ -767,9 +767,9 @@
 
 		// 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;
+		    const char *accept_ranges = http_get_field(http_hdr,"Accept-Ranges");
 		    const char *server = http_get_field(http_hdr, "Server");
-		    if( (accept_ranges = http_get_field(http_hdr,"Accept-Ranges")) != NULL )
+		    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