summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-10-15 12:18:23 +0200
committerTakashi Iwai <tiwai@suse.de>2008-10-15 12:18:23 +0200
commit47458ae7de308cb347ba634a445b3cec8589a20c (patch)
tree72a6a95af35ab641dc28ed5bdeefee44990bf400
parent8b16b925f4ecb6d0cf0dd5b045eebe12d7f778f5 (diff)
pulse - Fix capture problem
In pulse_start(), pa_stream_trigger() may return NULL for the capture stream, and this caused -EIO error. Allow now pa_stream_trigger() returning NULL. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--pulse/pcm_pulse.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c
index a5f794f..3d15ff0 100644
--- a/pulse/pcm_pulse.c
+++ b/pulse/pcm_pulse.c
@@ -145,18 +145,15 @@ static int pulse_start(snd_pcm_ioplug_t * io)
u = pa_stream_trigger(pcm->stream, pulse_stream_success_cb,
pcm->p);
- if (!u) {
- pa_operation_unref(o);
- err = -EIO;
- goto finish;
- }
pcm->underrun = 0;
err_o = pulse_wait_operation(pcm->p, o);
- err_u = pulse_wait_operation(pcm->p, u);
+ if (u)
+ err_u = pulse_wait_operation(pcm->p, u);
pa_operation_unref(o);
- pa_operation_unref(u);
+ if (u)
+ pa_operation_unref(u);
if (err_o < 0 || err_u < 0) {
err = -EIO;