mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fix zero-division in pcm_rate.c
Patch from Debian bug#539454 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
5332d74a67
commit
79345b523e
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ static int snd_pcm_rate_hw_refine_cchange(snd_pcm_t *pcm, snd_pcm_hw_params_t *p
|
|||
if (!snd_interval_checkempty(period_size) &&
|
||||
period_size->openmin && period_size->openmax &&
|
||||
period_size->min + 1 == period_size->max) {
|
||||
if ((buffer_size->min / period_size->min) * period_size->min == buffer_size->min) {
|
||||
if (period_size->min > 0 && (buffer_size->min / period_size->min) * period_size->min == buffer_size->min) {
|
||||
snd_interval_set_value(period_size, period_size->min);
|
||||
} else if ((buffer_size->max / period_size->max) * period_size->max == buffer_size->max) {
|
||||
snd_interval_set_value(period_size, period_size->max);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue