libavformat/http: return EIO when ffurl_read return 0, but s->off < target_end

Approved-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
raymondzheng 2017-05-18 14:35:31 +08:00 committed by Michael Niedermayer
parent 2336c76b22
commit 9f20cc5c84

View File

@ -1326,7 +1326,7 @@ static int http_buf_read(URLContext *h, uint8_t *buf, int size)
}
if (len > 0) {
s->off += len;
if (s->chunksize > 0) {
if (s->chunksize > 0 && s->chunksize != UINT64_MAX) {
av_assert0(s->chunksize >= len);
s->chunksize -= len;
}