Skip to content

[gnome-42] rdp-pipewire-stream: Do not prematurely clear PipeWire stream

Quoting the main commit here:

With the now implemented blocking mechanism in the remove_buffer
callback, PipeWire won't destroy buffers anymore, as long they are still
in use.
However, in order to queue a PipeWire buffer again, the PipeWire stream
is needed. But when destroying the stream, the stream is set to NULL
before it is destroyed.
This is problematic on the 42.x branch, as on that branch PipeWire
buffers can still be dequeued, while the EGL thread finishes processing
of the already dequeued PipeWire buffers.
As a result, these newly dequeued buffers trigger a crash, when queueing
these buffers again, as the respective PipeWire stream is already NULL.

Fix this issue, by not setting the PipeWire to NULL, when destroying it.

Fixes: https://errors.ubuntu.com/problem/b9db6ccdb84569be427829049e6f135d9777e574

This bug exists on the 42.x branch, but not on the master branch. CC: @3v1n0

Merge request reports