summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pulse/mainloop.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index c5443f23..090ac8c2 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -324,16 +324,15 @@ static pa_usec_t make_rt(const struct timeval *tv, pa_bool_t *use_rtclock) {
return PA_USEC_INVALID;
}
- if (tv->tv_usec & PA_TIMEVAL_RTCLOCK) {
- ttv = *tv;
- ttv.tv_usec &= ~PA_TIMEVAL_RTCLOCK;
- tv = pa_rtclock_from_wallclock(&ttv);
+ ttv = *tv;
+ *use_rtclock = !!(ttv.tv_usec & PA_TIMEVAL_RTCLOCK);
- *use_rtclock = TRUE;
- } else
- *use_rtclock = FALSE;
+ if (*use_rtclock)
+ ttv.tv_usec &= ~PA_TIMEVAL_RTCLOCK;
+ else
+ pa_rtclock_from_wallclock(&ttv);
- return pa_timeval_load(tv);
+ return pa_timeval_load(&ttv);
}
static pa_time_event* mainloop_time_new(