From 6b1719d0ed100ce5a65f28c3c4d4f3b59f3f56a0 Mon Sep 17 00:00:00 2001 From: shdown Date: Sun, 9 Jun 2019 13:40:14 +0000 Subject: [PATCH] mainloop: fix timeout assignment in pa_mainloop_prepare The function calculates the correct timeout (in microseconds) to assign in the `u` variable, but then assigns `m->prepared_timeout` the value of the `timeout` argument (in milliseconds). --- src/pulse/mainloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c index 03d724848..0cb4af3d3 100644 --- a/src/pulse/mainloop.c +++ b/src/pulse/mainloop.c @@ -802,7 +802,7 @@ int pa_mainloop_prepare(pa_mainloop *m, int timeout) { uint64_t u = (uint64_t) timeout * PA_USEC_PER_MSEC; if (u < m->prepared_timeout || m->prepared_timeout == PA_USEC_INVALID) - m->prepared_timeout = timeout; + m->prepared_timeout = u; } }