Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Ensure even dimensions for pipeline fallback

Richie McIlroy4b5782ecf04f
diff --git a/crates/recording/src/instant_recording.rs b/crates/recording/src/instant_recording.rs
index f260f92e7..e9b8fd375 100644
--- a/crates/recording/src/instant_recording.rs
+++ b/crates/recording/src/instant_recording.rs
@@ -227,7 +227,12 @@ async fn create_pipeline(
),
)
})
- .unwrap_or((screen_info.width, screen_info.height));
+ .unwrap_or_else(|| {
+ (
+ ensure_even(screen_info.width),
+ ensure_even(screen_info.height),
+ )
+ });
let (screen_capture, system_audio) = screen_source.to_sources().await?;