Browse Source

Merge commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f'

* commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f':
  http: Stop reading after receiving the whole file for non-chunked transfers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4
Michael Niedermayer 11 years ago
parent
commit
9f7a2ecb29
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/http.c

+ 2
- 1
libavformat/http.c View File

@@ -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);
}


Loading…
Cancel
Save