[FFmpeg-devel] [PATCH 3/4] libavformat/http: Reuse TCP sockets when 'multiple_requests' is set
Karthick J
kjeyapal at akamai.com
Fri Nov 3 10:27:02 EET 2017
---
libavformat/http.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/http.c b/libavformat/http.c
index bd9148f..b7bdcdc 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -227,6 +227,9 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options)
ff_url_join(buf, sizeof(buf), lower_proto, NULL, hostname, port, NULL);
if (!s->hd) {
+ if (s->multiple_requests && !strcmp(lower_proto, "tcp")) {
+ av_dict_set_int(options, "reuse_sockets", 1, 0);
+ }
err = ffurl_open_whitelist(&s->hd, buf, AVIO_FLAG_READ_WRITE,
&h->interrupt_callback, options,
h->protocol_whitelist, h->protocol_blacklist, h);
--
1.9.1
More information about the ffmpeg-devel
mailing list