mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05: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
1 changed files with 2 additions and 0 deletions
|
|
@ -168,6 +168,8 @@ static snd_pcm_sframes_t snd_pcm_pipewire_pointer(snd_pcm_ioplug_t *io)
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
if (pw->error < 0)
|
if (pw->error < 0)
|
||||||
return pw->error;
|
return pw->error;
|
||||||
|
if (io->buffer_size == 0)
|
||||||
|
return 0;
|
||||||
#ifdef SND_PCM_IOPLUG_FLAG_BOUNDARY_WA
|
#ifdef SND_PCM_IOPLUG_FLAG_BOUNDARY_WA
|
||||||
return pw->hw_ptr;
|
return pw->hw_ptr;
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue