[pulseaudio-commits] r1138 - /trunk/src/pulse/glib-mainloop.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Fri Jul 21 17:54:24 PDT 2006
Author: lennart
Date: Sat Jul 22 02:54:23 2006
New Revision: 1138
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1138&root=pulseaudio&view=rev
Log:
fix horribly broken glib timeout event handling
Modified:
trunk/src/pulse/glib-mainloop.c
Modified: trunk/src/pulse/glib-mainloop.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/glib-mainloop.c?rev=1138&root=pulseaudio&r1=1137&r2=1138&view=diff
==============================================================================
--- trunk/src/pulse/glib-mainloop.c (original)
+++ trunk/src/pulse/glib-mainloop.c Sat Jul 22 02:54:23 2006
@@ -312,7 +312,7 @@
assert(e);
assert(!e->dead);
- if (e->enabled && !!tv)
+ if (e->enabled && !tv)
e->mainloop->n_enabled_time_events--;
else if (!e->enabled && tv)
e->mainloop->n_enabled_time_events++;
@@ -476,13 +476,11 @@
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
- usec = pa_timeval_diff(&t->timeval, &tvnow);
-
- if (usec <= 0) {
+ if (pa_timeval_cmp(&t->timeval, &tvnow) <= 0) {
*timeout = 0;
return TRUE;
- }
-
+ }
+ usec = pa_timeval_diff(&t->timeval, &tvnow);
*timeout = (gint) (usec / 1000);
} else
*timeout = -1;
@@ -554,7 +552,7 @@
tvnow.tv_sec = now.tv_sec;
tvnow.tv_usec = now.tv_usec;
- if (pa_timeval_cmp(&t->timeval, &tvnow) < 0) {
+ if (pa_timeval_cmp(&t->timeval, &tvnow) <= 0) {
t->callback(&g->api, t, &t->timeval, t->userdata);
return TRUE;
}
More information about the pulseaudio-commits
mailing list