From 567be29db2cf64510a8bbe4aadd284fc9289f661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 10 Jun 2013 15:31:38 +0200 Subject: [PATCH] rtspconnection: Make sure to set a sensible default port for the GSocketConnection Otherwise it will connect to port 0 if no port is given in the URI. https://bugzilla.gnome.org/show_bug.cgi?id=701798 --- gst-libs/gst/rtsp/gstrtspconnection.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 5592273901..3be7e70138 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -647,10 +647,11 @@ gst_rtsp_connection_connect (GstRTSPConnection * conn, GTimeVal * timeout) uri = g_strdup_printf ("http://%s:%d%s%s%s", url->host, url_port, url->abspath, url->query ? "?" : "", url->query ? url->query : ""); } else { - uri = gst_rtsp_url_get_request_uri (conn->url); + uri = gst_rtsp_url_get_request_uri (url); } + connection = g_socket_client_connect_to_uri (conn->client, - uri, 0, conn->cancellable, &error); + uri, url_port, conn->cancellable, &error); if (connection == NULL) goto connect_failed;