From aef99f840fa39cb18165c76959ef32f376c5639c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 16 Nov 2023 09:49:34 +0100 Subject: [PATCH] Revert "gstpipewiresrc: break out of wait_started() also on STATE_UNCONNECTED" This reverts commit 7465175ad0eea825928b47182b3fd0131fe2154d. wait_started() is called before the stream is connecting and so exits with an error immediately, which then makes the stream start too early and block. --- src/gst/gstpipewiresrc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gst/gstpipewiresrc.c b/src/gst/gstpipewiresrc.c index e3b86b373..e473338ba 100644 --- a/src/gst/gstpipewiresrc.c +++ b/src/gst/gstpipewiresrc.c @@ -783,9 +783,10 @@ wait_started (GstPipeWireSrc *this) GST_DEBUG_OBJECT (this, "waiting for started signal, state now %s", pw_stream_state_as_string (state)); - if (state == PW_STREAM_STATE_ERROR || - state == PW_STREAM_STATE_UNCONNECTED || - this->flushing) { + if (state == PW_STREAM_STATE_ERROR) + break; + + if (this->flushing) { state = PW_STREAM_STATE_ERROR; break; }