output/pulse: don't drain if stream is suspended or corked

In this state, we can't make any progress.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1084
This commit is contained in:
Max Kellermann
2021-02-15 16:02:01 +01:00
parent c2bc3704e1
commit f1b8bcd6b2
2 changed files with 4 additions and 1 deletions

View File

@@ -830,7 +830,9 @@ PulseOutput::Drain()
{
Pulse::LockGuard lock(mainloop);
if (pa_stream_get_state(stream) != PA_STREAM_READY)
if (pa_stream_get_state(stream) != PA_STREAM_READY ||
pa_stream_is_suspended(stream) ||
pa_stream_is_corked(stream))
return;
pa_operation *o =