mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
fix long-standing buf that could cause polypaudio to eat 100% CPU: fix handling of event bits for pa_iochannel
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@940 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
cc61b57a32
commit
13329d36df
1 changed files with 4 additions and 4 deletions
|
|
@ -69,17 +69,17 @@ static void enable_mainloop_sources(pa_iochannel *io) {
|
|||
pa_io_event_flags_t f = PA_IO_EVENT_NULL;
|
||||
assert(io->input_event);
|
||||
|
||||
if (!pa_iochannel_is_readable(io))
|
||||
if (!io->readable)
|
||||
f |= PA_IO_EVENT_INPUT;
|
||||
if (!pa_iochannel_is_writable(io))
|
||||
if (!io->writable)
|
||||
f |= PA_IO_EVENT_OUTPUT;
|
||||
|
||||
io->mainloop->io_enable(io->input_event, f);
|
||||
} else {
|
||||
if (io->input_event)
|
||||
io->mainloop->io_enable(io->input_event, pa_iochannel_is_readable(io) ? PA_IO_EVENT_NULL : PA_IO_EVENT_INPUT);
|
||||
io->mainloop->io_enable(io->input_event, io->readable ? PA_IO_EVENT_NULL : PA_IO_EVENT_INPUT);
|
||||
if (io->output_event)
|
||||
io->mainloop->io_enable(io->output_event, pa_iochannel_is_writable(io) ? PA_IO_EVENT_NULL : PA_IO_EVENT_OUTPUT);
|
||||
io->mainloop->io_enable(io->output_event, io->writable ? PA_IO_EVENT_NULL : PA_IO_EVENT_OUTPUT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue