mirror of https://github.com/mpv-player/mpv
ao_alsa: don't early exit out of the loop if we have an error
This would cause us to exit out of the loop with a goto anytime we ran into XRUN or DRAINING and preparing PCM for use failed.
This commit is contained in:
parent
ec966fb866
commit
44da754018
|
@ -959,7 +959,8 @@ static bool recover_and_get_state(struct ao *ao, struct mp_pcm_state *state)
|
|||
case SND_PCM_STATE_XRUN:
|
||||
case SND_PCM_STATE_DRAINING:
|
||||
err = snd_pcm_prepare(p->alsa);
|
||||
CHECK_ALSA_ERROR("pcm prepare error");
|
||||
if (err < 0)
|
||||
MP_ERR(ao, "pcm prepare error: %s\n", snd_strerror(err));
|
||||
continue;
|
||||
// Hardware suspend.
|
||||
case SND_PCM_STATE_SUSPENDED:
|
||||
|
|
Loading…
Reference in New Issue