mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtsp-stream: fixed assert during update transport
When RTSP server trying update transport during multicast, it throws an assert. The assert is thrown because it is trying to get the parent of an non-existing funnel element. https://bugzilla.gnome.org/show_bug.cgi?id=760150
This commit is contained in:
parent
bec94861b0
commit
fdbda049c6
1 changed files with 13 additions and 9 deletions
|
@ -2911,7 +2911,7 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
|
|||
GstRTSPMulticastTransportSource *source;
|
||||
GstBin *bin;
|
||||
|
||||
bin = GST_BIN (gst_object_get_parent (GST_OBJECT (priv->funnel[0])));
|
||||
bin = GST_BIN (gst_object_get_parent (GST_OBJECT (priv->funnel[1])));
|
||||
|
||||
if (add) {
|
||||
gchar *host;
|
||||
|
@ -2940,6 +2940,7 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
|
|||
gst_bin_add (bin, source->udpsrc[i]);
|
||||
|
||||
/* and link to the funnel v4 */
|
||||
if (priv->sinkpad || i == 1) {
|
||||
source->selpad[i] = selpad =
|
||||
gst_element_get_request_pad (priv->funnel[i], "sink_%u");
|
||||
pad = gst_element_get_static_pad (source->udpsrc[i], "src");
|
||||
|
@ -2947,6 +2948,7 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
|
|||
gst_object_unref (pad);
|
||||
gst_object_unref (selpad);
|
||||
}
|
||||
}
|
||||
|
||||
priv->transport_sources =
|
||||
g_list_prepend (priv->transport_sources, source);
|
||||
|
@ -2974,9 +2976,11 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
|
|||
gst_element_set_state (source->udpsrc[i], GST_STATE_NULL);
|
||||
gst_object_unref (source->udpsrc[i]);
|
||||
|
||||
if (priv->sinkpad || i == 1) {
|
||||
gst_element_release_request_pad (priv->funnel[i],
|
||||
source->selpad[i]);
|
||||
}
|
||||
}
|
||||
|
||||
g_slice_free (GstRTSPMulticastTransportSource, source);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue