diff options
author | Martin Storsjö <martin@martin.st> | 2010-06-09 09:19:36 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-06-09 09:19:36 +0000 |
commit | 130b096aea6e91cff4b608f9ef61e9c96e3166d1 (patch) | |
tree | cf1bd6b5055bf3fba2f683abc1757cfe138706f0 | |
parent | 461628c6a8c2508490596194e0def2d2382574ac (diff) | |
download | ffmpeg-130b096aea6e91cff4b608f9ef61e9c96e3166d1.tar.gz |
Make sure the http protocol handler returns errors if a delayed open had failed
Originally committed as revision 23548 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/http.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index ef55bb0ad8..de76b4d777 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -371,6 +371,8 @@ static int http_read(URLContext *h, uint8_t *buf, int size) if (ret != 0) return ret; } + if (!s->hd) + return AVERROR(EIO); /* A size of zero can be used to force * initializaton of the connection. */ @@ -429,6 +431,8 @@ static int http_write(URLContext *h, const uint8_t *buf, int size) if (ret != 0) return ret; } + if (!s->hd) + return AVERROR(EIO); if (s->chunksize == -1) { /* headers are sent without any special encoding */ @@ -485,6 +489,8 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence) if (ret != 0) return ret; } + if (!s->hd) + return AVERROR(EIO); if (whence == AVSEEK_SIZE) return s->filesize; |