mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
pcm: rate: Add error check for snd_pcm_avail_update()
Without these changes a negative error code returned by snd_pcm_avail_update() will be not handled correctly. With this patch the returned error code of snd_pcm_avail_update() will be returned by snd_pcm_rate_avail_update(). Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2972f2f966
commit
2c04ea1f29
1 changed files with 4 additions and 1 deletions
|
|
@ -970,9 +970,12 @@ static snd_pcm_sframes_t snd_pcm_rate_avail_update(snd_pcm_t *pcm)
|
|||
{
|
||||
snd_pcm_rate_t *rate = pcm->private_data;
|
||||
snd_pcm_t *slave = rate->gen.slave;
|
||||
snd_pcm_uframes_t slave_size;
|
||||
snd_pcm_sframes_t slave_size;
|
||||
|
||||
slave_size = snd_pcm_avail_update(slave);
|
||||
if (slave_size < 0)
|
||||
return slave_size;
|
||||
|
||||
if (pcm->stream == SND_PCM_STREAM_CAPTURE)
|
||||
goto _capture;
|
||||
snd_pcm_rate_sync_hwptr(pcm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue