souphttpsrc: Unset limit on the number of connection if soup session sharing is used
authorSeungha Yang <sh.yang@lge.com>
Tue, 4 Jul 2017 05:58:00 +0000 (14:58 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 4 Jul 2017 06:13:12 +0000 (09:13 +0300)
Soup allows only up to two connections per host in a session,
if we use default value. When session sharing is used, however,
more connections might be required in a session.
(e.g., multi-audio adaptive streaming case)

https://bugzilla.gnome.org/show_bug.cgi?id=784495

ext/soup/gstsouphttpsrc.c

index f603ff5..3d588ad 100644 (file)
@@ -979,6 +979,10 @@ gst_soup_http_src_session_open (GstSoupHTTPSrc * src)
           GST_DEBUG_OBJECT (src, "Sharing session %p", src->session);
           src->session_is_shared = TRUE;
 
+          /* Unset the limit the number of maximum allowed connection */
+          g_object_set (src->session, SOUP_SESSION_MAX_CONNS, G_MAXINT,
+              SOUP_SESSION_MAX_CONNS_PER_HOST, G_MAXINT, NULL);
+
           context = gst_context_new (GST_SOUP_SESSION_CONTEXT, TRUE);
           s = gst_context_writable_structure (context);
           gst_structure_set (s, "session", SOUP_TYPE_SESSION, src->session,