rtsp-server: Only unblock live streams when complete

When media consists of multiple streams we should only unblock the
complete streams.

Fixes #2443

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4334>
This commit is contained in:
Jacob Johnsson 2023-10-02 08:33:19 +02:00 committed by GStreamer Marge Bot
parent eb0272e210
commit e49a9df621

View file

@ -3007,6 +3007,12 @@ gst_rtsp_media_get_rates (GstRTSPMedia * media, gdouble * rate,
static void
stream_update_blocked (GstRTSPStream * stream, GstRTSPMedia * media)
{
/* only unblock complete live streams when media is prepared */
if (media->priv->is_live &&
media->priv->status == GST_RTSP_MEDIA_STATUS_PREPARED &&
!media->priv->blocked && !gst_rtsp_stream_is_complete (stream))
return;
gst_rtsp_stream_set_blocked (stream, media->priv->blocked);
}