Commit 3165ff37 authored by Srimanta Panda's avatar Srimanta Panda Committed by Sebastian Dröge

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
parent 20d8fc4e
......@@ -2840,7 +2840,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;
......@@ -2869,12 +2869,14 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
gst_bin_add (bin, source->udpsrc[i]);
/* and link to the funnel v4 */
source->selpad[i] = selpad =
gst_element_get_request_pad (priv->funnel[i], "sink_%u");
pad = gst_element_get_static_pad (source->udpsrc[i], "src");
gst_pad_link (pad, selpad);
gst_object_unref (pad);
gst_object_unref (selpad);
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");
gst_pad_link (pad, selpad);
gst_object_unref (pad);
gst_object_unref (selpad);
}
}
priv->transport_sources =
......@@ -2903,8 +2905,10 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
gst_element_set_state (source->udpsrc[i], GST_STATE_NULL);
gst_object_unref (source->udpsrc[i]);
gst_element_release_request_pad (priv->funnel[i],
source->selpad[i]);
if (priv->sinkpad || i == 1) {
gst_element_release_request_pad (priv->funnel[i],
source->selpad[i]);
}
}
g_slice_free (GstRTSPMulticastTransportSource, source);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment