mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
gst: also stop waiting when we are flushing
This commit is contained in:
parent
077808b09a
commit
a2202de679
1 changed files with 12 additions and 2 deletions
|
|
@ -572,6 +572,11 @@ gst_pipewire_src_stream_start (GstPipeWireSrc *pwsrc)
|
||||||
if (state == PW_STREAM_STATE_ERROR)
|
if (state == PW_STREAM_STATE_ERROR)
|
||||||
goto start_error;
|
goto start_error;
|
||||||
|
|
||||||
|
if (pwsrc->flushing) {
|
||||||
|
error = "flushing";
|
||||||
|
goto start_error;
|
||||||
|
}
|
||||||
|
|
||||||
pw_thread_loop_wait (pwsrc->core->loop);
|
pw_thread_loop_wait (pwsrc->core->loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -608,6 +613,11 @@ wait_started (GstPipeWireSrc *this)
|
||||||
if (state == PW_STREAM_STATE_ERROR)
|
if (state == PW_STREAM_STATE_ERROR)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (this->flushing) {
|
||||||
|
state = PW_STREAM_STATE_ERROR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (this->started)
|
if (this->started)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -672,7 +682,7 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
||||||
if (state == PW_STREAM_STATE_UNCONNECTED)
|
if (state == PW_STREAM_STATE_UNCONNECTED)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (state == PW_STREAM_STATE_ERROR) {
|
if (state == PW_STREAM_STATE_ERROR || pwsrc->flushing) {
|
||||||
g_ptr_array_unref (possible);
|
g_ptr_array_unref (possible);
|
||||||
goto connect_error;
|
goto connect_error;
|
||||||
}
|
}
|
||||||
|
|
@ -695,7 +705,7 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
||||||
enum pw_stream_state state = pw_stream_get_state (pwsrc->stream, &error);
|
enum pw_stream_state state = pw_stream_get_state (pwsrc->stream, &error);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (basesrc, "waiting for NEGOTIATED, now %s", pw_stream_state_as_string (state));
|
GST_DEBUG_OBJECT (basesrc, "waiting for NEGOTIATED, now %s", pw_stream_state_as_string (state));
|
||||||
if (state == PW_STREAM_STATE_ERROR)
|
if (state == PW_STREAM_STATE_ERROR || pwsrc->flushing)
|
||||||
goto connect_error;
|
goto connect_error;
|
||||||
|
|
||||||
if (pwsrc->negotiated)
|
if (pwsrc->negotiated)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue