From: "Arkadiusz (Arkq) Bokowy" <arkadiusz.bokowy@gmail.com>
To: alsa-devel@alsa-project.org
Subject: [PATCH 1/3] rate: Check for slave avail update error code
Date: Sun, 7 Jan 2018 14:30:12 +0100 [thread overview]
Message-ID: <20180107143012.78211148@sambook> (raw)
rate: Check for slave avail update error code
Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
---
src/pcm/pcm_rate.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
index 4e0c7ca7..e7d50593 100644
--- a/src/pcm/pcm_rate.c
+++ b/src/pcm/pcm_rate.c
@@ -970,9 +970,11 @@ 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);
--
2.13.6
reply other threads:[~2018-01-07 13:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180107143012.78211148@sambook \
--to=arkadiusz.bokowy@gmail.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.