mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
pcm: rate: Don't return negative frame count on success in rewind
snd_pcm_rewind is documented to return <0 on failure and >=0 on success. Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
8dcce52ee0
commit
351870fd2d
1 changed files with 1 additions and 1 deletions
|
|
@ -702,7 +702,7 @@ static snd_pcm_sframes_t snd_pcm_rate_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t f
|
|||
snd_atomic_write_begin(&rate->watom);
|
||||
n = snd_pcm_rate_move_applptr(pcm, -frames);
|
||||
snd_atomic_write_end(&rate->watom);
|
||||
return n;
|
||||
return n < 0 ? -n : n;
|
||||
}
|
||||
|
||||
static snd_pcm_sframes_t snd_pcm_rate_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue