pulse-server: only react to state changes when not corked

When we are starting or corked we don't emit suspend/resume caused
by state changes.
This commit is contained in:
Wim Taymans 2025-06-24 18:21:28 +02:00
parent bcb9ff20fd
commit bd7ce5c7fa

View file

@ -1129,7 +1129,7 @@ static void stream_state_changed(void *data, enum pw_stream_state old,
/* Don't emit suspended if we are creating a corked stream, as that will have a quick
* RUNNING/SUSPENDED transition for initial negotiation */
if (stream->create_tag == SPA_ID_INVALID || !stream->corked) {
if (stream->create_tag == SPA_ID_INVALID && !stream->corked) {
if (old == PW_STREAM_STATE_PAUSED && state == PW_STREAM_STATE_STREAMING)
stream_send_suspended(stream, false);
if (old == PW_STREAM_STATE_STREAMING && state == PW_STREAM_STATE_PAUSED)