Commit d1eeed6a authored by Max Kellermann's avatar Max Kellermann

output/alsa: fix SIGFPE when alsa announces a period size of 0

parent 736fd0e2
......@@ -3,6 +3,8 @@ ver 0.16.4 (2011/??/??)
* decoder:
- ffmpeg: workaround for semantic API change in recent ffmpeg versions
- flac: validate the sample rate when scanning the tag
* output:
- alsa: fix SIGFPE when alsa announces a period size of 0
ver 0.16.3 (2011/06/04)
......
......@@ -508,6 +508,14 @@ configure_hw:
g_debug("buffer_size=%u period_size=%u",
(unsigned)alsa_buffer_size, (unsigned)alsa_period_size);
if (alsa_period_size == 0)
/* this works around a SIGFPE bug that occurred when
an ALSA driver indicated period_size==0; this
caused a division by zero in alsa_play(). By using
the fallback "1", we make sure that this won't
happen again. */
alsa_period_size = 1;
ad->period_frames = alsa_period_size;
ad->period_position = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment