]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm, file: don't recurse in the rewindable and forwardable callbacks
authorAlexander E. Patrakov <patrakov@gmail.com>
Sat, 13 Sep 2014 18:30:21 +0000 (00:30 +0600)
committerJaroslav Kysela <perex@perex.cz>
Sat, 13 Sep 2014 19:05:33 +0000 (21:05 +0200)
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_file.c

index a0b8bf41bf5b78eed0dd207b5e154a485a0a3ae3..5541a939502778d756b59d49badd8365b960b9a7 100644 (file)
@@ -454,7 +454,7 @@ static int snd_pcm_file_drain(snd_pcm_t *pcm)
 static snd_pcm_sframes_t snd_pcm_file_rewindable(snd_pcm_t *pcm)
 {
        snd_pcm_file_t *file = pcm->private_data;
-       snd_pcm_sframes_t res = snd_pcm_rewindable(pcm);
+       snd_pcm_sframes_t res = snd_pcm_rewindable(file->gen.slave);
        snd_pcm_sframes_t n = snd_pcm_bytes_to_frames(pcm, file->wbuf_used_bytes);
        if (res > n)
                res = n;
@@ -482,7 +482,7 @@ static snd_pcm_sframes_t snd_pcm_file_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t f
 static snd_pcm_sframes_t snd_pcm_file_forwardable(snd_pcm_t *pcm)
 {
        snd_pcm_file_t *file = pcm->private_data;
-       snd_pcm_sframes_t res = snd_pcm_forwardable(pcm);
+       snd_pcm_sframes_t res = snd_pcm_forwardable(file->gen.slave);
        snd_pcm_sframes_t n = snd_pcm_bytes_to_frames(pcm, file->wbuf_size_bytes - file->wbuf_used_bytes);
        if (res > n)
                res = n;