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:
llyyr 2024-09-10 19:02:56 +05:30 committed by sfan5
parent ec966fb866
commit 44da754018
1 changed files with 2 additions and 1 deletions

View File

@ -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: