This commit is contained in:
rustdesk 2022-07-28 11:09:36 +08:00
parent 7d8da4acbe
commit c8e2161b88

View File

@ -378,7 +378,6 @@ fn run(sp: GenericService) -> ResultType<()> {
let mut c = get_capturer(true)?; let mut c = get_capturer(true)?;
let mut video_qos = VIDEO_QOS.lock().unwrap(); let mut video_qos = VIDEO_QOS.lock().unwrap();
video_qos.set_size(c.width as _, c.height as _); video_qos.set_size(c.width as _, c.height as _);
let mut spf = video_qos.spf(); let mut spf = video_qos.spf();
let bitrate = video_qos.generate_bitrate()?; let bitrate = video_qos.generate_bitrate()?;
@ -441,7 +440,6 @@ fn run(sp: GenericService) -> ResultType<()> {
#[cfg(windows)] #[cfg(windows)]
check_uac_switch(c.privacy_mode_id, c._captuerer_privacy_mode_id)?; check_uac_switch(c.privacy_mode_id, c._captuerer_privacy_mode_id)?;
{
let mut video_qos = VIDEO_QOS.lock().unwrap(); let mut video_qos = VIDEO_QOS.lock().unwrap();
if video_qos.check_if_updated() { if video_qos.check_if_updated() {
log::debug!( log::debug!(
@ -452,7 +450,7 @@ fn run(sp: GenericService) -> ResultType<()> {
encoder.set_bitrate(video_qos.target_bitrate).unwrap(); encoder.set_bitrate(video_qos.target_bitrate).unwrap();
spf = video_qos.spf(); spf = video_qos.spf();
} }
} drop(video_qos);
if *SWITCH.lock().unwrap() { if *SWITCH.lock().unwrap() {
bail!("SWITCH"); bail!("SWITCH");