Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(linux): only fail video sessions on early stream errors

EtienneLescote72abcfb1da2
diff --git a/electron/native/pipewire-capture/src/main.rs b/electron/native/pipewire-capture/src/main.rs
index 0407c07ca..15638cebd 100644
--- a/electron/native/pipewire-capture/src/main.rs
+++ b/electron/native/pipewire-capture/src/main.rs
@@ -1253,7 +1253,11 @@ fn run<W: Write>(
continue;
}
if let Some(error) = error {
- if state == "error" && !recording_started {
+ // Fatal in video mode only, where the app would otherwise wait
+ // on a recording that never starts. A cursor-only session has
+ // no `Capture`, so `recording_started` never turns true there
+ // and a late error would end it.
+ if state == "error" && frames.is_some() && !recording_started {
let _ = emitter.emit(&Event::Error {
code: "pipewire-capture-failed".to_owned(),
message: format!("OpenScreen could not start screen capture: {error}"),