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.
This commit is contained in:
wm4 2014-10-03 18:13:01 +02:00
parent cf2add4ff9
commit 9570976255
1 changed files with 1 additions and 1 deletions

View File

@ -400,7 +400,7 @@ static int init(struct ao *ao)
.fragsize = -1, .fragsize = -1,
}; };
int flags = PA_STREAM_NOT_MONOTONIC; int flags = PA_STREAM_NOT_MONOTONIC | PA_STREAM_FAIL_ON_SUSPEND;
if (!priv->cfg_latency_hacks) if (!priv->cfg_latency_hacks)
flags |= PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE; flags |= PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE;