Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2015-10-19 01:50:21 +0300
committerRodger Combs <rodger.combs@gmail.com>2015-11-26 04:34:01 +0300
commit362c17e6563808ef48655e5ddf59a35b6497b8b2 (patch)
tree819dc6f78ce8e6740ad90e1e311d209e52f5a378 /libavformat/http.c
parentb3494e3c3eab98cfca8a39ce1122f79becbf7cfa (diff)
lavf/http: fix incorrect warning in range requests
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 4b4a22559b..606286ad5a 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -1155,15 +1155,16 @@ static int http_buf_read(URLContext *h, uint8_t *buf, int size)
memcpy(buf, s->buf_ptr, len);
s->buf_ptr += len;
} else {
+ int64_t target_end = s->end_off ? s->end_off : s->filesize;
if ((!s->willclose || s->chunksize < 0) &&
- s->filesize >= 0 && s->off >= s->filesize)
+ target_end >= 0 && s->off >= target_end)
return AVERROR_EOF;
len = ffurl_read(s->hd, buf, size);
if (!len && (!s->willclose || s->chunksize < 0) &&
- s->filesize >= 0 && s->off < s->filesize) {
+ target_end >= 0 && s->off < target_end) {
av_log(h, AV_LOG_ERROR,
"Stream ends prematurely at %"PRId64", should be %"PRId64"\n",
- s->off, s->filesize
+ s->off, target_end
);
return AVERROR(EIO);
}