mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse: handle EINTR from the custom poll function
This commit is contained in:
parent
c43026d93e
commit
b59eff4c29
1 changed files with 5 additions and 8 deletions
|
|
@ -340,9 +340,11 @@ int pa_mainloop_poll(pa_mainloop *m)
|
|||
fds[0].events = POLLIN;
|
||||
fds[0].revents = 0;
|
||||
|
||||
res = m->poll_func(fds, 1,
|
||||
usec_to_timeout(m->timeout),
|
||||
m->poll_func_userdata);
|
||||
do {
|
||||
res = m->poll_func(fds, 1,
|
||||
usec_to_timeout(m->timeout),
|
||||
m->poll_func_userdata);
|
||||
} while (res == -EINTR);
|
||||
do_iterate = res == 1 && SPA_FLAG_IS_SET(fds[0].revents, POLLIN);
|
||||
timeout = 0;
|
||||
} else {
|
||||
|
|
@ -357,11 +359,6 @@ int pa_mainloop_poll(pa_mainloop *m)
|
|||
} while (res == -EINTR);
|
||||
pw_loop_leave(m->loop);
|
||||
}
|
||||
|
||||
if (res < 0) {
|
||||
if (res == -EINTR)
|
||||
res = 0;
|
||||
}
|
||||
m->n_events = res;
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue