mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtsp-stream: make use of blocked_running_time in query_position
When blocking, the sink element will not have received a buffer yet and the position query will fail. Instead, we make use of the running time of the buffer we blocked on. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/160>
This commit is contained in:
parent
a446ba4fb0
commit
6d319f8e49
1 changed files with 7 additions and 0 deletions
|
@ -5428,6 +5428,13 @@ gst_rtsp_stream_query_position (GstRTSPStream * stream, gint64 * position)
|
|||
priv = stream->priv;
|
||||
|
||||
g_mutex_lock (&priv->lock);
|
||||
|
||||
if (priv->blocking && GST_CLOCK_TIME_IS_VALID (priv->blocked_running_time)) {
|
||||
*position = priv->blocked_running_time;
|
||||
g_mutex_unlock (&priv->lock);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* depending on the transport type, it should query corresponding sink */
|
||||
if (priv->configured_protocols & GST_RTSP_LOWER_TRANS_UDP)
|
||||
sink = priv->udpsink[0];
|
||||
|
|
Loading…
Reference in a new issue