mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
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:
parent
cbaeea4af7
commit
6b1719d0ed
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue