diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-11-15 19:52:29 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-11-15 19:56:26 +0200 |
commit | d51f8abe567587343cad0ad096e4740e9969b17d (patch) | |
tree | 5bbe0a39f2f6184af092e68650bcd5e4c3ac9fef | |
parent | bed93b915d8a4be12a2ab71ed10f919d55519b0a (diff) |
rtsp-stream: Only update the RTP udpsink if it actually exists
For send-only streams it does not exist, but the RTCP udpsink might.
-rw-r--r-- | gst/rtsp-server/rtsp-stream.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c index 67c02d1..2b4c1ec 100644 --- a/gst/rtsp-server/rtsp-stream.c +++ b/gst/rtsp-server/rtsp-stream.c @@ -3725,16 +3725,19 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans, if (add) { if (ttl > 0) { GST_INFO ("setting ttl-mc %d", ttl); - g_object_set (G_OBJECT (priv->udpsink[0]), "ttl-mc", ttl, NULL); + if (priv->udpsink[0]) + g_object_set (G_OBJECT (priv->udpsink[0]), "ttl-mc", ttl, NULL); g_object_set (G_OBJECT (priv->udpsink[1]), "ttl-mc", ttl, NULL); } GST_INFO ("adding %s:%d-%d", dest, min, max); - g_signal_emit_by_name (priv->udpsink[0], "add", dest, min, NULL); + if (priv->udpsink[0]) + g_signal_emit_by_name (priv->udpsink[0], "add", dest, min, NULL); g_signal_emit_by_name (priv->udpsink[1], "add", dest, max, NULL); priv->transports = g_list_prepend (priv->transports, trans); } else { GST_INFO ("removing %s:%d-%d", dest, min, max); - g_signal_emit_by_name (priv->udpsink[0], "remove", dest, min, NULL); + if (priv->udpsink[0]) + g_signal_emit_by_name (priv->udpsink[0], "remove", dest, min, NULL); g_signal_emit_by_name (priv->udpsink[1], "remove", dest, max, NULL); priv->transports = g_list_remove (priv->transports, trans); } |