summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-02-15 16:02:01 +0100
committerMax Kellermann <max@musicpd.org>2021-02-15 16:07:16 +0100
commitf1b8bcd6b26ff40fc49dab1b46f4a85e58eafeab (patch)
treeea4c6d853fc15860bc7a85d52bc4563c14f04688 /src
parentc2bc3704e1fc40107cffa550bb1475655a634c06 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/output/plugins/PulseOutputPlugin.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/output/plugins/PulseOutputPlugin.cxx b/src/output/plugins/PulseOutputPlugin.cxx
index a76562fef..47c5fe025 100644
--- a/src/output/plugins/PulseOutputPlugin.cxx
+++ b/src/output/plugins/PulseOutputPlugin.cxx
@@ -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 =