[alsa-devel] [PATCH 1/2] pcm_file: remove double line
snd_pcm_file_add_frames called two times by mistake, introduced in 2a800c0c4f259043c9217a4aa6a57afaf9f77477
Signed-off-by: Adam Miartus amiartus@de.adit-jv.com --- src/pcm/pcm_file.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c index ca8e0c8..11d0953 100644 --- a/src/pcm/pcm_file.c +++ b/src/pcm/pcm_file.c @@ -613,7 +613,6 @@ static snd_pcm_sframes_t snd_pcm_file_readi(snd_pcm_t *pcm, void *buffer, snd_pc snd_pcm_areas_from_buf(pcm, areas, buffer); snd_pcm_file_areas_read_infile(pcm, areas, 0, frames); __snd_pcm_lock(pcm); - snd_pcm_file_add_frames(pcm, areas, 0, frames); if (snd_pcm_file_add_frames(pcm, areas, 0, frames) < 0) { __snd_pcm_unlock(pcm); return -EPIPE;
Signed-off-by: Adam Miartus amiartus@de.adit-jv.com --- src/pcm/pcm_file.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c index 11d0953..3712fd8 100644 --- a/src/pcm/pcm_file.c +++ b/src/pcm/pcm_file.c @@ -402,6 +402,7 @@ static int snd_pcm_file_write_bytes(snd_pcm_t *pcm, size_t bytes) n = cont; err = write(file->fd, file->wbuf + file->file_ptr_bytes, n); if (err < 0) { + err = errno; SYSERR("%s write failed, file data may be corrupt", file->fname); return err; }
On Mon, 24 Jun 2019 13:23:24 +0200, Adam Miartus wrote:
Signed-off-by: Adam Miartus amiartus@de.adit-jv.com
src/pcm/pcm_file.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c index 11d0953..3712fd8 100644 --- a/src/pcm/pcm_file.c +++ b/src/pcm/pcm_file.c @@ -402,6 +402,7 @@ static int snd_pcm_file_write_bytes(snd_pcm_t *pcm, size_t bytes) n = cont; err = write(file->fd, file->wbuf + file->file_ptr_bytes, n); if (err < 0) {
err = errno;
It must be -errno.
Takashi
On Mon, 24 Jun 2019 13:23:23 +0200, Adam Miartus wrote:
snd_pcm_file_add_frames called two times by mistake, introduced in 2a800c0c4f259043c9217a4aa6a57afaf9f77477
Signed-off-by: Adam Miartus amiartus@de.adit-jv.com
Applied, thanks.
Takashi
participants (2)
-
Adam Miartus
-
Takashi Iwai