[FFmpeg-cvslog] avformat/http: Avoid calling http_shutdown() if end of chunk is signalled already

Karthick Jeyapal git at videolan.org
Mon Dec 25 06:08:51 EET 2017


ffmpeg | branch: master | Karthick Jeyapal <kjeyapal at akamai.com> | Mon Dec 25 12:07:43 2017 +0800| [6848201f704b5e8e1ebdc911dba94ebc1e52c6b0] | committer: Steven Liu

avformat/http: Avoid calling http_shutdown() if end of chunk is signalled already

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6848201f704b5e8e1ebdc911dba94ebc1e52c6b0
---

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

diff --git a/libavformat/http.c b/libavformat/http.c
index 7a68378acb..c15ca522c4 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -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;



More information about the ffmpeg-cvslog mailing list