mirror of https://github.com/mpv-player/mpv
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:
parent
cf2add4ff9
commit
9570976255
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue