mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
media: Only add fakesink once per pipeline
The intention is to prevent going PLAYING state before pads are created. If there was mutilple dynamic payload, it would leak few fakesink and actually prevent from ever reaching playing state. https://bugzilla.gnome.org/show_bug.cgi?id=753385
This commit is contained in:
parent
160b87430f
commit
707ac9c487
1 changed files with 6 additions and 4 deletions
|
@ -2517,10 +2517,12 @@ start_prepare (GstRTSPMedia * media)
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (elem), "gst-rtsp-dynpay-handlers", handlers);
|
g_object_set_data (G_OBJECT (elem), "gst-rtsp-dynpay-handlers", handlers);
|
||||||
|
|
||||||
/* we add a fakesink here in order to make the state change async. We remove
|
if (!priv->fakesink) {
|
||||||
* the fakesink again in the no-more-pads callback. */
|
/* we add a fakesink here in order to make the state change async. We remove
|
||||||
priv->fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
* the fakesink again in the no-more-pads callback. */
|
||||||
gst_bin_add (GST_BIN (priv->pipeline), priv->fakesink);
|
priv->fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
||||||
|
gst_bin_add (GST_BIN (priv->pipeline), priv->fakesink);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!start_preroll (media))
|
if (!start_preroll (media))
|
||||||
|
|
Loading…
Reference in a new issue