stream: Fix randomly missing streams from SDP with dynamic elements
authorXavier Claessens <xavier.claessens@collabora.com>
Thu, 6 Oct 2016 15:47:50 +0000 (11:47 -0400)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 6 Oct 2016 16:05:36 +0000 (19:05 +0300)
commitc0f24fea8381c0d35a4f255edbfd5d53463338bf
treed0f625c4c4f8cfec3885c7cf783b13cd2b7fa43b
parent87f8eed5a73e1018077bef14750e10d0ec337450
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
gst/rtsp-server/rtsp-stream.c