pulse-server: clear the drained state correctly

When we start the drain, we unpause the stream. When we conplete the
drain, we unpause again, which does nothing when the stream was already
unpaused. However, this leaves the drained state on the stream and so
the stream will never be able to play new data.

Trigger a new pw_stream_set_active() with the current stream state to
clear the drained state.

Fixes #2928
This commit is contained in:
Wim Taymans 2023-01-10 12:49:22 +01:00
parent 97aafe2234
commit 624e265fd6

View file

@ -1541,7 +1541,7 @@ static void stream_drained(void *data)
reply_simple_ack(stream->client, stream->drain_tag);
stream->drain_tag = 0;
stream_set_paused(stream, false, "complete drain");
pw_stream_set_active(stream->stream, !stream->is_paused);
}
}