Browse Source

http: Fail reading if the connection has gone away

This can happen if doing a new request using the same socket,
but the new request failed, which clears the urlcontext.

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n1.0
Martin Storsjö 13 years ago
parent
commit
eb564b23a3
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/http.c

+ 3
- 0
libavformat/http.c View File

@@ -510,6 +510,9 @@ static int http_read(URLContext *h, uint8_t *buf, int size)
HTTPContext *s = h->priv_data;
int err, new_location;

if (!s->hd)
return AVERROR_EOF;

if (s->end_chunked_post) {
if (!s->end_header) {
err = http_read_header(h, &new_location);


Loading…
Cancel
Save