From ea9d1a73cc500890d812aeb260265cfcffca36e2 Mon Sep 17 00:00:00 2001
From: Brendan Allan <brendonovich@outlook.com>
Date: Fri, 4 Oct 2024 16:09:00 +0800
Subject: [PATCH] use capture size for creating display frames

---
 apps/desktop/src-tauri/src/display.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/desktop/src-tauri/src/display.rs b/apps/desktop/src-tauri/src/display.rs
index ca0afcf5..c68d1bb9 100644
--- a/apps/desktop/src-tauri/src/display.rs
+++ b/apps/desktop/src-tauri/src/display.rs
@@ -203,7 +203,7 @@ pub async fn start_capturing(
 
                 match frame {
                     Ok(Frame::BGRA(frame)) => {
-                        let rgb_frame = bgra_frame(&frame.data, frame_size.0, frame_size.1);
+                        let rgb_frame = bgra_frame(&frame.data, capture_size[0], capture_size[1]);
 
                         let mut yuv_frame = Video::empty();
                         scaler.run(&rgb_frame, &mut yuv_frame).unwrap();