alsa: protect against SIGPFE

Make sure we don't try to divide by 0 when the app calls the status
before we are PREPARED.

Fixes #283
This commit is contained in:
Wim Taymans 2020-09-07 14:57:47 +02:00
parent 71441565fd
commit b6e84ded75

View file

@ -168,6 +168,8 @@ static snd_pcm_sframes_t snd_pcm_pipewire_pointer(snd_pcm_ioplug_t *io)
return -EPIPE;
if (pw->error < 0)
return pw->error;
if (io->buffer_size == 0)
return 0;
#ifdef SND_PCM_IOPLUG_FLAG_BOUNDARY_WA
return pw->hw_ptr;
#else