diff options
author | Arun Raghavan <arun@asymptotic.io> | 2020-11-23 12:56:41 -0500 |
---|---|---|
committer | Arun Raghavan <arun@arunraghavan.net> | 2020-11-23 18:05:27 +0000 |
commit | e6b3edd3c167f5db35af6b5d9b432034f8280d7f (patch) | |
tree | c2867804543c101e022ab68d1df3ad873ca3b5ac /src/pulse/mainloop.c | |
parent | 2ea425d1942b0171724ca81a4da5691f3c0645d7 (diff) |
Revert "mainloop: fix timeout assignment in pa_mainloop_prepare"
This reverts commit 6b1719d0ed100ce5a65f28c3c4d4f3b59f3f56a0, as it
inadvertently broke the semantics of timeout in the API.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1039
Diffstat (limited to 'src/pulse/mainloop.c')
-rw-r--r-- | src/pulse/mainloop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c index 0cb4af3d3..355935e09 100644 --- a/src/pulse/mainloop.c +++ b/src/pulse/mainloop.c @@ -799,10 +799,8 @@ int pa_mainloop_prepare(pa_mainloop *m, int timeout) { m->prepared_timeout = calc_next_timeout(m); if (timeout >= 0) { - uint64_t u = (uint64_t) timeout * PA_USEC_PER_MSEC; - - if (u < m->prepared_timeout || m->prepared_timeout == PA_USEC_INVALID) - m->prepared_timeout = u; + if (timeout < m->prepared_timeout || m->prepared_timeout == PA_USEC_INVALID) + m->prepared_timeout = timeout; } } |