From 9570976255083c1ec32add62613c52ad98fa28c8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 3 Oct 2014 18:13:01 +0200 Subject: 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. --- audio/out/ao_pulse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/out/ao_pulse.c') 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; -- cgit v1.2.3