mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-07 00:20:09 +00:00
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:
parent
71441565fd
commit
b6e84ded75
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue