mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-19 08:57:00 -05:00
mainloop fixes: when disabling time events when dispatching them, make sure to adjust the cache time event and enabled time event counters
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1153 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
b2ad9a9753
commit
0d7be3148e
2 changed files with 12 additions and 2 deletions
|
|
@ -766,7 +766,12 @@ static int dispatch_timeout(pa_mainloop *m) {
|
|||
if (pa_timeval_cmp(&e->timeval, &now) <= 0) {
|
||||
assert(e->callback);
|
||||
|
||||
e->enabled = 0;
|
||||
/* Disable time event */
|
||||
mainloop_time_restart(e, NULL);
|
||||
|
||||
if (m->cached_next_time_event == e)
|
||||
m->cached_next_time_event = NULL;
|
||||
|
||||
e->callback(&m->api, e, &e->timeval, e->userdata);
|
||||
|
||||
r++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue