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.
This commit is contained in:
Michael Olbrich 2020-03-23 14:51:28 +01:00
parent 44ccca3086
commit a696d980b5

View file

@ -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);