summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricia Muscalu <patricia@axis.com>2018-12-05 15:07:25 +0100
committerSebastian Dröge <slomo@coaxion.net>2018-12-06 08:59:04 +0000
commit3be1b9bba8a165a62008871eff3e9cfcb1338910 (patch)
tree3e80507b00d0ae2f72a4ddfc3f01368992e8209c
parent5b86dc34eef2f4bf5770e3ec5f4d6e91af0182f5 (diff)
Add source elements to the pipeline before activation
In plug_src we changed the element state before adding it to the owner container. This prevented the pipeline from intercepting a GST_STREAM_STATUS_TYPE_CREATE message from the pad in order to assign a custom task pool. Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/53
-rw-r--r--gst/rtsp-server/rtsp-stream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c
index 83291d6a2a..33eeb50d59 100644
--- a/gst/rtsp-server/rtsp-stream.c
+++ b/gst/rtsp-server/rtsp-stream.c
@@ -3401,6 +3401,9 @@ plug_src (GstRTSPStream * stream, GstBin * bin, GstElement * src,
priv = stream->priv;
+ /* add src */
+ gst_bin_add (bin, src);
+
pad = gst_element_get_static_pad (src, "src");
if (priv->srcpad) {
/* block pad so src can't push data while it's not yet linked */
@@ -3412,9 +3415,6 @@ plug_src (GstRTSPStream * stream, GstBin * bin, GstElement * src,
gst_element_set_locked_state (src, TRUE);
}
- /* add src */
- gst_bin_add (bin, src);
-
/* and link to the funnel */
selpad = gst_element_get_request_pad (funnel, "sink_%u");
gst_pad_link (pad, selpad);