summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_pulse.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-03 18:13:01 +0200
committerwm4 <wm4@nowhere>2014-10-03 23:04:12 +0200
commit9570976255083c1ec32add62613c52ad98fa28c8 (patch)
tree95a2b2bd008a43f33ee87d5be24ce645d49ea85d /audio/out/ao_pulse.c
parentcf2add4ff98c71b125ddbff041a85b8fe3b4cc5b (diff)
downloadmpv-9570976255083c1ec32add62613c52ad98fa28c8.tar.bz2
mpv-9570976255083c1ec32add62613c52ad98fa28c8.tar.xz
ao_pulse: refuse to start suspended
Sometimes, ao_pulse starts in suspended mode, which means playback is essentially paused in pulseaudio. This gives the impression that mpv is hanging, since it times video against the audio playback progress, and audio never makes progress in this state. I'm not sure if this will help - possibly it does with mixed pulseaudio/alsa setups. However, if the alsa setup has the pulseaudio plugin, alsa will hang too. But there's still a chance we get less blame for pulseaudio messes.
Diffstat (limited to 'audio/out/ao_pulse.c')
-rw-r--r--audio/out/ao_pulse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c
index 09fbfc547c..9cc24d99a4 100644
--- a/audio/out/ao_pulse.c
+++ b/audio/out/ao_pulse.c
@@ -400,7 +400,7 @@ static int init(struct ao *ao)
.fragsize = -1,
};
- int flags = PA_STREAM_NOT_MONOTONIC;
+ int flags = PA_STREAM_NOT_MONOTONIC | PA_STREAM_FAIL_ON_SUSPEND;
if (!priv->cfg_latency_hacks)
flags |= PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE;