Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix(wayland): avoid clock waits in PipeWire capture (#16430)

Zixun LIe5bc204fe4da
diff --git a/libs/scrap/src/wayland/pipewire.rs b/libs/scrap/src/wayland/pipewire.rs
index 57b116641..24fa2f655 100644
--- a/libs/scrap/src/wayland/pipewire.rs
+++ b/libs/scrap/src/wayland/pipewire.rs
@@ -277,6 +277,8 @@ fn gst_element(name: &str) -> ResultType<gst::Element> {
impl PipeWireRecorder {
pub fn new(capturable: PipeWireCapturable) -> ResultType<Self> {
let pipeline = gst::Pipeline::new(None);
+ // Clock waits on stale capture timestamps can exhaust the compositor's buffers.
+ pipeline.use_clock(None::<&gst::Clock>);
let src = gst_element("pipewiresrc")?;
src.set_property("fd", &capturable.fd.as_raw_fd())?;