mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
Revert "rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: fix incorrect scheme for tls transport methods"
This reverts commit 024ef7659d
because it causes a regression:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2412
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4298>
This commit is contained in:
parent
348cb2ed70
commit
e8d7f326ff
1 changed files with 3 additions and 13 deletions
|
@ -59,11 +59,9 @@
|
|||
G_DEFINE_BOXED_TYPE (GstRTSPUrl, gst_rtsp_url,
|
||||
(GBoxedCopyFunc) gst_rtsp_url_copy, (GBoxedFreeFunc) gst_rtsp_url_free);
|
||||
|
||||
#define SCHEME_SIZE 7
|
||||
|
||||
static const struct
|
||||
{
|
||||
const char scheme[SCHEME_SIZE];
|
||||
const char scheme[6];
|
||||
GstRTSPLowerTrans transports;
|
||||
} rtsp_schemes_map[] = {
|
||||
{
|
||||
|
@ -328,8 +326,6 @@ gst_rtsp_url_get_request_uri (const GstRTSPUrl * url)
|
|||
const gchar *post_host;
|
||||
const gchar *pre_query;
|
||||
const gchar *query;
|
||||
gchar scheme[SCHEME_SIZE] = "rtsp";
|
||||
guint i;
|
||||
|
||||
g_return_val_if_fail (url != NULL, NULL);
|
||||
|
||||
|
@ -337,18 +333,12 @@ gst_rtsp_url_get_request_uri (const GstRTSPUrl * url)
|
|||
post_host = url->family == GST_RTSP_FAM_INET6 ? "]" : "";
|
||||
pre_query = url->query ? "?" : "";
|
||||
query = url->query ? url->query : "";
|
||||
for (i = 0; i < G_N_ELEMENTS (rtsp_schemes_map); i++) {
|
||||
if (url->transports == rtsp_schemes_map[i].transports) {
|
||||
strcpy (scheme, rtsp_schemes_map[i].scheme);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (url->port != 0) {
|
||||
uri = g_strdup_printf ("%s://%s%s%s:%u%s%s%s", scheme, pre_host, url->host,
|
||||
uri = g_strdup_printf ("rtsp://%s%s%s:%u%s%s%s", pre_host, url->host,
|
||||
post_host, url->port, url->abspath, pre_query, query);
|
||||
} else {
|
||||
uri = g_strdup_printf ("%s://%s%s%s%s%s%s", scheme, pre_host, url->host,
|
||||
uri = g_strdup_printf ("rtsp://%s%s%s%s%s%s", pre_host, url->host,
|
||||
post_host, url->abspath, pre_query, query);
|
||||
}
|
||||
return uri;
|
||||
|
|
Loading…
Reference in a new issue