From: "Bård Eirik Winther" <bwinther@cisco.com>
To: linux-media@vger.kernel.org
Subject: [PATCH 4/5] qv4l2: fix a bug where the alsa thread never stops
Date: Fri, 2 Aug 2013 14:05:36 +0200 [thread overview]
Message-ID: <dba8ec599edbf0cc9e521f1178fe1c9f54eda050.1375445112.git.bwinther@cisco.com> (raw)
In-Reply-To: <1375445137-19443-1-git-send-email-bwinther@cisco.com>
In-Reply-To: <1a734456df06299e284f793264ca843c98b0f18a.1375445112.git.bwinther@cisco.com>
If the output audio device never read the buffer then the alsa thread
would continue to fill it up and never stop when the capture stops.
Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
---
utils/qv4l2/alsa_stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/qv4l2/alsa_stream.c b/utils/qv4l2/alsa_stream.c
index 90d3afb..43ecda3 100644
--- a/utils/qv4l2/alsa_stream.c
+++ b/utils/qv4l2/alsa_stream.c
@@ -436,7 +436,7 @@ static snd_pcm_sframes_t writebuf(snd_pcm_t *handle, char *buf, long len)
{
snd_pcm_sframes_t r;
- while (1) {
+ while (!stop_alsa) {
r = snd_pcm_writei(handle, buf, len);
if (r == len)
return 0;
--
1.8.3.2
next prev parent reply other threads:[~2013-08-02 12:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 12:05 [PATCH 0/5] qv4l2: add ALSA audio playback Bård Eirik Winther
2013-08-02 12:05 ` [PATCH 1/5] qv4l2: alter capture menu Bård Eirik Winther
2013-08-02 12:05 ` [PATCH 2/5] qv4l2: new ALSA stream source code Bård Eirik Winther
2013-08-02 12:05 ` [PATCH 3/5] qv4l2: add ALSA stream to qv4l2 Bård Eirik Winther
2013-08-02 12:25 ` Hans Verkuil
2013-08-02 22:19 ` Gregor Jasny
2013-08-05 7:45 ` Bård Eirik Winther
2013-08-02 12:05 ` Bård Eirik Winther [this message]
2013-08-02 12:05 ` [PATCH 5/5] qv4l2: add ALSA audio playback Bård Eirik Winther
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=dba8ec599edbf0cc9e521f1178fe1c9f54eda050.1375445112.git.bwinther@cisco.com \
--to=bwinther@cisco.com \
--cc=linux-media@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).