mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Fix segfault with downsampling
Fix segfault in the initialization for downsampling.
This commit is contained in:
parent
a0a440dcf4
commit
1889920a43
1 changed files with 2 additions and 1 deletions
|
|
@ -751,7 +751,8 @@ static int snd_pcm_rate_init(snd_pcm_t *pcm)
|
||||||
switch (rate->type) {
|
switch (rate->type) {
|
||||||
case RATE_TYPE_LINEAR:
|
case RATE_TYPE_LINEAR:
|
||||||
/* for expand */
|
/* for expand */
|
||||||
memset(rate->old_sample, 0, sizeof(*rate->old_sample) * pcm->channels);
|
if (rate->old_sample)
|
||||||
|
memset(rate->old_sample, 0, sizeof(*rate->old_sample) * pcm->channels);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue