From f0ac29113cc88099b6cba0a0883cf17d451ca413 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 13 Jan 2012 18:11:36 +0000 Subject: [PATCH] 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). --- ext/pulse/pulsesrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c index 88c8b00..98f7f0c 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 { -- 2.7.4