mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
thread-mq: create event on the right mainloop
It seems that the intention was to create create write_thread_event on thread_mainloop instead of main_mainloop (the first parameter of io_new() is thread_mainloop, io_free() is called on thread_mainloop etc.). As long as both mainloops are implemented with pa_mainloop, this bug has no effect on behaviour, because the io_new() implementation is the same. And indeed, with the current code base both mainloops are always pa_mainloops. However, when the tunnel-new modules switches to pa_rtpoll as the pa_mainloop_api provider, this bug would cause problems.
This commit is contained in:
parent
184c28795b
commit
d1fa269216
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ int pa_thread_mq_init_thread_mainloop(pa_thread_mq *q, pa_mainloop_api *main_mai
|
|||
pa_assert_se(pa_asyncmsgq_read_before_poll(q->outq) == 0);
|
||||
pa_asyncmsgq_write_before_poll(q->outq);
|
||||
pa_assert_se(q->read_main_event = main_mainloop->io_new(main_mainloop, pa_asyncmsgq_read_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_read_cb, q));
|
||||
pa_assert_se(q->write_thread_event = main_mainloop->io_new(thread_mainloop, pa_asyncmsgq_write_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_write_outq_cb, q));
|
||||
pa_assert_se(q->write_thread_event = thread_mainloop->io_new(thread_mainloop, pa_asyncmsgq_write_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_write_outq_cb, q));
|
||||
|
||||
pa_asyncmsgq_read_before_poll(q->inq);
|
||||
pa_asyncmsgq_write_before_poll(q->inq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue