[FFmpeg-devel] [PATCH v2 1/2] avformat/http: Avoid calling http_shutdown() if end of chunk is signalled already

Karthick J kjeyapal at akamai.com
Fri Dec 22 10:44:32 EET 2017


From: Karthick Jeyapal <kjeyapal at akamai.com>

---
 libavformat/http.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index cf86adc..4635a9a 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -307,9 +307,11 @@ int ff_http_do_new_request(URLContext *h, const char *uri)
     AVDictionary *options = NULL;
     int ret;
 
-    ret = http_shutdown(h, h->flags);
-    if (ret < 0)
-        return ret;
+    if (!s->end_chunked_post) {
+        ret = http_shutdown(h, h->flags);
+        if (ret < 0)
+            return ret;
+    }
 
     s->end_chunked_post = 0;
     s->chunkend      = 0;
-- 
1.9.1



More information about the ffmpeg-devel mailing list