This can happen if doing a new request using the same socket,
but the new request failed, which clears the urlcontext.
---
 libavformat/http.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index b2f2ea9..2b5f2cc 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -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);
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to