gstpipewiresrc: break out of wait_started() also on STATE_UNCONNECTED

When the session manager sends an error to the client, it typically
also destroys the node after the error, which causes the stream to go
to STATE_UNCONNECTED via proxy_removed(). In that case, make sure
we exit the loop early, otherwise it will take 30 seconds to unblock
gst_element_set_state()
This commit is contained in:
George Kiagiadakis 2023-11-08 18:23:02 +02:00 committed by Wim Taymans
parent a852b979b6
commit 7465175ad0

View file

@ -783,10 +783,9 @@ 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)
break;
if (this->flushing) {
if (state == PW_STREAM_STATE_ERROR ||
state == PW_STREAM_STATE_UNCONNECTED ||
this->flushing) {
state = PW_STREAM_STATE_ERROR;
break;
}