mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fix segfault
Fix segfault (occuring when buffer/period sizes are aligned).
This commit is contained in:
parent
9a0f2817bb
commit
cac370de25
1 changed files with 2 additions and 0 deletions
|
|
@ -573,9 +573,11 @@ static int snd_pcm_rate_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
|
|||
SNDMSG("rate plugin already in use");
|
||||
return -EBUSY;
|
||||
}
|
||||
#if 0
|
||||
if ((buffer_size / period_size) * period_size == buffer_size &&
|
||||
(slave->buffer_size / slave->period_size) * slave->period_size == slave->buffer_size)
|
||||
return 0;
|
||||
#endif
|
||||
rate->pareas = malloc(2 * channels * sizeof(*rate->pareas));
|
||||
if (rate->pareas == NULL)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue