diff mbox

[FFmpeg-devel,v2,2/2] avformat/{http, tls}: enable tcp_nodelay

Message ID 20171114174059.14555-2-ffmpeg@tmm1.net
State Superseded
Headers show

Commit Message

Aman Gupta Nov. 14, 2017, 5:40 p.m. UTC
From: Aman Gupta <aman@tmm1.net>

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 libavformat/http.c | 1 +
 libavformat/tls.c  | 1 +
 2 files changed, 2 insertions(+)
diff mbox

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index 056d5f6583..f0a80b7add 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -468,6 +468,7 @@  static int http_listen(URLContext *h, const char *uri, int flags,
                 NULL);
     if ((ret = av_dict_set_int(options, "listen", s->listen, 0)) < 0)
         goto fail;
+    av_dict_set_int(options, "tcp_nodelay", 1, 0);
     if ((ret = ffurl_open_whitelist(&s->hd, lower_url, AVIO_FLAG_READ_WRITE,
                                     &h->interrupt_callback, options,
                                     h->protocol_whitelist, h->protocol_blacklist, h
diff --git a/libavformat/tls.c b/libavformat/tls.c
index 10e0792e29..a56f51f85b 100644
--- a/libavformat/tls.c
+++ b/libavformat/tls.c
@@ -104,6 +104,7 @@  int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AV
                     proxy_port, "/%s", dest);
     }
 
+    av_dict_set_int(options, "tcp_nodelay", 1, 0);
     return ffurl_open_whitelist(&c->tcp, buf, AVIO_FLAG_READ_WRITE,
                                 &parent->interrupt_callback, options,
                                 parent->protocol_whitelist, parent->protocol_blacklist, parent);