[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] Revert "mainloop: fix timeout assignment in pa_mainloop_prepare"
Tanu Kaskinen
gitlab at gitlab.freedesktop.org
Mon Nov 23 18:13:48 UTC 2020
Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio
Commits:
e6b3edd3 by Arun Raghavan at 2020-11-23T18:05:27+00:00
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
- - - - -
2 changed files:
- src/pulse/mainloop.c
- src/pulse/mainloop.h
Changes:
=====================================
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;
}
}
=====================================
src/pulse/mainloop.h
=====================================
@@ -85,7 +85,7 @@ void pa_mainloop_free(pa_mainloop* m);
/** Prepare for a single iteration of the main loop. Returns a negative value
on error or exit request. timeout specifies a maximum timeout for the subsequent
-poll, or -1 for blocking behaviour. .*/
+poll, or -1 for blocking behaviour. The timeout is specified in microseconds. */
int pa_mainloop_prepare(pa_mainloop *m, int timeout);
/** Execute the previously prepared poll. Returns a negative value on error.*/
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/e6b3edd3c167f5db35af6b5d9b432034f8280d7f
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/e6b3edd3c167f5db35af6b5d9b432034f8280d7f
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20201123/ac74a74c/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list