diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2012-01-13 18:11:36 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2012-01-13 18:11:36 +0000 |
commit | f0ac29113cc88099b6cba0a0883cf17d451ca413 (patch) | |
tree | c45386f24da80c8ff61913f712cfd534e06dc17a | |
parent | f799fb2c90f8d2c640bb049144233dab75a2730f (diff) |
pulsesrc: fix wrong error check
pa_stream_* functions return negative on error, despite the defines
for error codes being positive.
I only got to repro the error twice, so I'm not sure 100% sure this
fixes the issue (the negative var being uninitialized after returning
from pa_stream_get_latency).
-rw-r--r-- | ext/pulse/pulsesrc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c index 88c8b002f..98f7f0c0f 100644 --- a/ext/pulse/pulsesrc.c +++ b/ext/pulse/pulsesrc.c @@ -1230,7 +1230,7 @@ gst_pulsesrc_delay (GstAudioSrc * asrc) pa_threaded_mainloop_unlock (pulsesrc->mainloop); - if (res > 0) { + if (res < 0) { GST_DEBUG_OBJECT (pulsesrc, "could not get latency"); result = 0; } else { |