From a696d980b5c0bf91c845e2afce40eb3b70bc910c Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Mon, 23 Mar 2020 14:51:28 +0100 Subject: [PATCH] rtsp-stream: use mcast_udpsink[0] last-sample if available for rtpinfo Otherwise no sink is found for multicast sreams and the less accurate fallback is used to determine the current sequence number and timestamp. --- gst/rtsp-server/rtsp-stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c index 7204e9c85f..aabb3b0a33 100644 --- a/gst/rtsp-server/rtsp-stream.c +++ b/gst/rtsp-server/rtsp-stream.c @@ -4161,11 +4161,13 @@ gst_rtsp_stream_get_rtpinfo (GstRTSPStream * stream, * This will have a more accurate sequence number and timestamp, as between * the payloader and the sink there can be some queues */ - if (priv->udpsink[0] || priv->appsink[0]) { + if (priv->udpsink[0] || priv->mcast_udpsink[0] || priv->appsink[0]) { GstSample *last_sample; if (priv->udpsink[0]) g_object_get (priv->udpsink[0], "last-sample", &last_sample, NULL); + else if (priv->mcast_udpsink[0]) + g_object_get (priv->mcast_udpsink[0], "last-sample", &last_sample, NULL); else g_object_get (priv->appsink[0], "last-sample", &last_sample, NULL);