summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-19 18:04:10 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-19 18:04:10 +0000
commit67352a6575f2c0b4dd65140f40c35336eda81c06 (patch)
treef44c4ccb1c8a824e2bd41e87ee9d269645289225 /stream
parent6334e53e9592897b2533f289ff985d3f0e7cdc4c (diff)
downloadmpv-67352a6575f2c0b4dd65140f40c35336eda81c06.tar.bz2
mpv-67352a6575f2c0b4dd65140f40c35336eda81c06.tar.xz
Fill stream->end_pos if possible, fixing lavf demuxers that need to seek.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26031 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/http.c b/stream/http.c
index aa723adf17..3af0d47c4d 100644
--- a/stream/http.c
+++ b/stream/http.c
@@ -818,8 +818,10 @@ static int http_streaming_start(stream_t *stream, int* file_format) {
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) {