diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-13 18:26:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-13 18:26:40 +0200 |
commit | 9f7a2ecb29264388f3997dcd34647a55cfa22253 (patch) | |
tree | f98717f96ac5501c3ed636032f675a28e0ee4e98 /libavformat | |
parent | a539f1cbbd8f32a5a3875a4d194c418077e3b6d8 (diff) | |
parent | 8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f (diff) | |
download | ffmpeg-9f7a2ecb29264388f3997dcd34647a55cfa22253.tar.gz |
Merge commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f'
* commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f':
http: Stop reading after receiving the whole file for non-chunked transfers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/http.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 18fd9e038d..a9f1700f2d 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -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); } |