From 6371f2fc294ef427351a470532c27bfe2caa9acb Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 20 Nov 2017 18:30:19 +0100 Subject: [PATCH] rtsp-media: Don't unblock with remaining dynamic payloaders If we still have some dynamic paylaoders which haven't posted no-more-pads yet, don't go to PREPARED if one of the streams blocked. The risk was that we would end up not exposing/using all specified streams. The downside is that if you have _multiple_ _live_ _dynamic_ payloaders then it will take a bit more time to start. But only if those 3 conditions are present. https://bugzilla.gnome.org/show_bug.cgi?id=769521 --- gst/rtsp-server/rtsp-media.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 8fe9efe..d158938 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -2555,8 +2555,9 @@ default_handle_message (GstRTSPMedia * media, GstMessage * message) s = gst_message_get_structure (message); if (gst_structure_has_name (s, "GstRTSPStreamBlocking")) { GST_DEBUG ("media received blocking message"); - if (priv->blocked && media_streams_blocking (media)) { - GST_DEBUG ("media is blocking"); + if (priv->blocked && media_streams_blocking (media) && + priv->no_more_pads_pending == 0) { + GST_DEBUG_OBJECT (GST_MESSAGE_SRC (message), "media is blocking"); collect_media_stats (media); if (priv->status == GST_RTSP_MEDIA_STATUS_PREPARING) -- 2.7.4