mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
rtspsrc: Handle the case of *
as session-wide control URL from the SDP
Just like the comment above says this is supposed to indicate that the same URL should be used as for the connection so far. If encountering this case simply do nothing. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6982>
This commit is contained in:
parent
6f984939c4
commit
d263a8d2fe
1 changed files with 17 additions and 11 deletions
|
@ -8232,23 +8232,29 @@ gst_rtspsrc_open_from_sdp (GstRTSPSrc * src, GstSDPMessage * sdp,
|
|||
if (control == NULL)
|
||||
break;
|
||||
|
||||
if (g_strcmp0 (control, "*") == 0)
|
||||
break;
|
||||
|
||||
/* only take fully qualified urls */
|
||||
if (gst_uri_is_valid (control))
|
||||
break;
|
||||
}
|
||||
if (control) {
|
||||
g_free (src->conninfo.location);
|
||||
src->conninfo.location = g_strdup (control);
|
||||
/* make a connection for this, if there was a connection already, nothing
|
||||
* happens. */
|
||||
if (gst_rtsp_conninfo_connect (src, &src->conninfo, async) < 0) {
|
||||
GST_ERROR_OBJECT (src, "could not connect");
|
||||
|
||||
if (g_strcmp0 (control, "*") != 0) {
|
||||
if (control) {
|
||||
g_free (src->conninfo.location);
|
||||
src->conninfo.location = g_strdup (control);
|
||||
/* make a connection for this, if there was a connection already, nothing
|
||||
* happens. */
|
||||
if (gst_rtsp_conninfo_connect (src, &src->conninfo, async) < 0) {
|
||||
GST_ERROR_OBJECT (src, "could not connect");
|
||||
}
|
||||
}
|
||||
/* we need to keep the control url separate from the connection url because
|
||||
* the rules for constructing the media control url need it */
|
||||
g_free (src->control);
|
||||
src->control = g_strdup (control);
|
||||
}
|
||||
/* we need to keep the control url separate from the connection url because
|
||||
* the rules for constructing the media control url need it */
|
||||
g_free (src->control);
|
||||
src->control = g_strdup (control);
|
||||
}
|
||||
|
||||
/* create streams */
|
||||
|
|
Loading…
Reference in a new issue