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).
This commit is contained in:
shdown 2019-06-09 13:40:14 +00:00
parent cbaeea4af7
commit 6b1719d0ed

View file

@ -802,7 +802,7 @@ int pa_mainloop_prepare(pa_mainloop *m, int timeout) {
uint64_t u = (uint64_t) timeout * PA_USEC_PER_MSEC; uint64_t u = (uint64_t) timeout * PA_USEC_PER_MSEC;
if (u < m->prepared_timeout || m->prepared_timeout == PA_USEC_INVALID) if (u < m->prepared_timeout || m->prepared_timeout == PA_USEC_INVALID)
m->prepared_timeout = timeout; m->prepared_timeout = u;
} }
} }