From e49a9df6211bf3f6474b2e302d0dfe28c16f7703 Mon Sep 17 00:00:00 2001 From: Jacob Johnsson Date: Mon, 2 Oct 2023 08:33:19 +0200 Subject: [PATCH] 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: --- subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-media.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-media.c b/subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-media.c index 66a640e95a..5dabb355ff 100644 --- a/subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-media.c +++ b/subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-media.c @@ -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); }