Commit 9f7a2ecb authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '8bf3bf69'

* commit '8bf3bf69':
  http: Stop reading after receiving the whole file for non-chunked transfers
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a539f1cb 8bf3bf69
......@@ -841,7 +841,8 @@ static int http_buf_read(URLContext *h, uint8_t *buf, int size)
memcpy(buf, s->buf_ptr, len);
s->buf_ptr += len;
} else {
if (!s->willclose && s->filesize >= 0 && s->off >= s->filesize)
if ((!s->willclose || s->chunksize < 0) &&
s->filesize >= 0 && s->off >= s->filesize)
return AVERROR_EOF;
len = ffurl_read(s->hd, buf, size);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment