tunnel-{sink, source}-new: Fix assertion when used with loopback or combine-sink
authorGeorg Chini <georg@chini.tk>
Sat, 12 Aug 2017 20:29:26 +0000 (22:29 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 17 Aug 2017 08:40:17 +0000 (11:40 +0300)
commit49ab711c28d5cac6ac4114ecb6477e118f28f720
treed1c11f5f9e698cbfd39c10d9c9e6356889a2bc63
parent23f46f1d1cbb02301ccfd27bf79219045849d37f
tunnel-{sink, source}-new: Fix assertion when used with loopback or combine-sink

Currently pulseaudio crashes with an assertion in pa_rtpoll_item_new_asyncmsgq_read()
or pa_rtpoll_item_new_asyncmsgq_write() if a loopback is applied to a tunnel-new
sink or source, because tunnel-{sink,source}-new do not set thread_info.rtpoll.
The same applies to module-combine-sink and module-rtp-recv.

This patch is not a complete fix for the problem but provides a temporary band-aid
by initializing thread_info.rtpoll properly. The rtpoll created is never run, but
loopback and combine-sink nevertheless work, see comments in the code.

This patch does not work for module-rtp-recv, but using rtp-recv with a remote
sink does not seem to make a lot of sense anyway.

link: https://bugs.freedesktop.org/show_bug.cgi?id=73429
src/modules/module-tunnel-sink-new.c
src/modules/module-tunnel-source-new.c