mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
srt: Use default host and port if uri doesn't provide
This commit is contained in:
parent
2bb907eb9c
commit
dc28105220
1 changed files with 8 additions and 5 deletions
|
@ -494,15 +494,18 @@ gst_srt_object_validate_parameters (GstStructure * s, GstUri * uri)
|
|||
guint local_port;
|
||||
const gchar *local_address = gst_structure_get_string (s, "localaddress");
|
||||
|
||||
|
||||
if (local_address == NULL) {
|
||||
gst_srt_object_set_string_value (s, "localaddress",
|
||||
GST_SRT_DEFAULT_LOCALADDRESS);
|
||||
local_address =
|
||||
gst_uri_get_host (uri) ==
|
||||
NULL ? GST_SRT_DEFAULT_LOCALADDRESS : gst_uri_get_host (uri);
|
||||
gst_srt_object_set_string_value (s, "localaddress", local_address);
|
||||
}
|
||||
|
||||
if (!gst_structure_get_uint (s, "localport", &local_port)) {
|
||||
gst_srt_object_set_uint_value (s, "localport",
|
||||
G_STRINGIFY (GST_SRT_DEFAULT_PORT));
|
||||
local_port =
|
||||
gst_uri_get_port (uri) ==
|
||||
GST_URI_NO_PORT ? GST_SRT_DEFAULT_PORT : gst_uri_get_port (uri);
|
||||
gst_structure_set (s, "localport", G_TYPE_UINT, local_port, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue