diff stream/http.c @ 25999:aff1f94af7ba

Fill stream->end_pos if possible, fixing lavf demuxers that need to seek.
author albeu
date Tue, 19 Feb 2008 18:04:10 +0000
parents 63531b22e351
children 5a30f5bc23a0
line wrap: on
line diff
--- a/stream/http.c	Tue Feb 19 08:20:43 2008 +0000
+++ b/stream/http.c	Tue Feb 19 18:04:10 2008 +0000
@@ -818,8 +818,10 @@
 				if( content_type!=NULL ) {
 					char *content_length = NULL;
 					mp_msg(MSGT_NETWORK,MSGL_V,"Content-Type: [%s]\n", content_type );
-					if( (content_length = http_get_field(http_hdr, "Content-Length")) != NULL)
+					if( (content_length = http_get_field(http_hdr, "Content-Length")) != NULL) {
 						mp_msg(MSGT_NETWORK,MSGL_V,"Content-Length: [%s]\n", http_get_field(http_hdr, "Content-Length"));
+						stream->end_pos = atoi(content_length);
+					}
 					// Check in the mime type table for a demuxer type
 					i = 0;
 					while(mime_type_table[i].mime_type != NULL) {