avformat/http: Avoid calling http_shutdown() if end of chunk is signalled already
authorKarthick Jeyapal <kjeyapal@akamai.com>
Mon, 25 Dec 2017 04:07:43 +0000 (12:07 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 25 Dec 2017 04:07:43 +0000 (12:07 +0800)
libavformat/http.c

index 7a68378..c15ca52 100644 (file)
@@ -323,9 +323,11 @@ int ff_http_do_new_request(URLContext *h, const char *uri)
         return AVERROR(EINVAL);
     }
 
-    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;
+    }
 
     if (s->willclose)
         return AVERROR_EOF;