Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX(client): Prevent endless loop when disconnecting PipeWire stream
Since version 0.3.51, PipeWire has support for buffers with a size of 0 being passed in the process callback. More specifically, this feature was added in commit 96286fb8b11658a0fdaa61194504a3f9541b25e6 ("resample: use a -1 buffer size to drain") in PipeWire [1]. Unfortunately, this causes an endless loop, because we try to destroy the PipeWire stream, but it keeps waiting for the node to be completely drained, which now never happens because it keeps calling processCallback() where we feed buffers with a size of 0 to it. To fix this problem, we stop passing buffers to PipeWire when we are destroying PipeWireOutput by setting m_ok to false on destruction and checking for isOk() in the callback. Fixes #5647 [1] https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/96286fb8b11658a0fdaa61194504a3f9541b25e7
- Loading branch information