mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
scrap: ensure video_handler's creation before client start
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -1159,9 +1159,11 @@ where
|
||||
|
||||
let latency_controller = LatencyController::new();
|
||||
let latency_controller_cl = latency_controller.clone();
|
||||
// Create video_handler out of the thread below to ensure that the handler exists before client start.
|
||||
// It will take a few tenths of a second for the first time, and then tens of milliseconds.
|
||||
let mut video_handler = VideoHandler::new(latency_controller);
|
||||
|
||||
std::thread::spawn(move || {
|
||||
let mut video_handler = VideoHandler::new(latency_controller);
|
||||
loop {
|
||||
if let Ok(data) = video_receiver.recv() {
|
||||
match data {
|
||||
|
||||
Reference in New Issue
Block a user