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).
This commit is contained in:
Vincent Penquerc'h 2012-01-13 18:11:36 +00:00
parent f799fb2c90
commit f0ac29113c

View file

@ -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 {