avformat/http: Match chunksize checks to master..3.0
Fixes warning about impossible condition Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4a947f4385
commit
1ec9fd15b9
@ -1176,10 +1176,10 @@ static int http_buf_read(URLContext *h, uint8_t *buf, int size)
|
|||||||
memcpy(buf, s->buf_ptr, len);
|
memcpy(buf, s->buf_ptr, len);
|
||||||
s->buf_ptr += len;
|
s->buf_ptr += len;
|
||||||
} else {
|
} else {
|
||||||
if ((!s->willclose || s->chunksize < 0) && s->off >= s->filesize)
|
if ((!s->willclose || s->chunksize == UINT64_MAX) && s->off >= s->filesize)
|
||||||
return AVERROR_EOF;
|
return AVERROR_EOF;
|
||||||
len = ffurl_read(s->hd, buf, size);
|
len = ffurl_read(s->hd, buf, size);
|
||||||
if (!len && (!s->willclose || s->chunksize < 0) && s->off < s->filesize) {
|
if (!len && (!s->willclose || s->chunksize == UINT64_MAX) && s->off < s->filesize) {
|
||||||
av_log(h, AV_LOG_ERROR,
|
av_log(h, AV_LOG_ERROR,
|
||||||
"Stream ends prematurely at %"PRIu64", should be %"PRIu64"\n",
|
"Stream ends prematurely at %"PRIu64", should be %"PRIu64"\n",
|
||||||
s->off, s->filesize
|
s->off, s->filesize
|
||||||
|
Loading…
x
Reference in New Issue
Block a user