summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2016-10-06 11:47:50 -0400
committerSebastian Dröge <sebastian@centricular.com>2016-10-25 15:53:49 +0300
commit7d4acec9bf330a74c6f2ac1dc1945a29e0814571 (patch)
treeb784d8d04add8ec2b0bb15da749a72a3628bbc1a
parentede027662bb157384b6eb3d57f9963e2ddf0029a (diff)
stream: Fix randomly missing streams from SDP with dynamic elements
When using dynamic elements, gst_rtsp_stream_join_bin() is called from "pad-added" signal. In that case priv->srcpad could already have its caps, and they'll be sent to priv->send_src[0] pad. That means that when it connects "notify::caps" signal, that pad could already have received its caps and the signal won't be emitted anymore. In that case priv->caps stay to NULL and when building the SDP that stream gets ignored. Leading to missing video or audio when playing in client side. https://bugzilla.gnome.org/show_bug.cgi?id=772478
-rw-r--r--gst/rtsp-server/rtsp-stream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c
index e36c64a..b3efc0f 100644
--- a/gst/rtsp-server/rtsp-stream.c
+++ b/gst/rtsp-server/rtsp-stream.c
@@ -2615,6 +2615,7 @@ gst_rtsp_stream_join_bin (GstRTSPStream * stream, GstBin * bin,
/* be notified of caps changes */
priv->caps_sig = g_signal_connect (priv->send_src[0], "notify::caps",
(GCallback) caps_notify, stream);
+ priv->caps = gst_pad_get_current_caps (priv->send_src[0]);
}
priv->joined_bin = gst_object_ref (bin);