mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-07 18:02:48 +08:00
fix client check supported_hwcodec bug
This commit is contained in:
parent
7457551b21
commit
cae2c2942e
@ -1319,7 +1319,7 @@ impl LoginConfigHandler {
|
|||||||
self.conn_id = pi.conn_id;
|
self.conn_id = pi.conn_id;
|
||||||
// no matter if change, for update file time
|
// no matter if change, for update file time
|
||||||
self.save_config(config);
|
self.save_config(config);
|
||||||
#[cfg(feature = "hwcodec")]
|
#[cfg(any(feature = "hwcodec", feature = "mediacodec"))]
|
||||||
{
|
{
|
||||||
self.supported_encoding = Some((pi.encoding.h264, pi.encoding.h265));
|
self.supported_encoding = Some((pi.encoding.h264, pi.encoding.h265));
|
||||||
}
|
}
|
||||||
|
@ -146,10 +146,9 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
let decoder = scrap::codec::Decoder::video_codec_state(&self.id);
|
let decoder = scrap::codec::Decoder::video_codec_state(&self.id);
|
||||||
let mut h264 = decoder.score_h264 > 0;
|
let mut h264 = decoder.score_h264 > 0;
|
||||||
let mut h265 = decoder.score_h265 > 0;
|
let mut h265 = decoder.score_h265 > 0;
|
||||||
if let Some((encoding_264, encoding_265)) = self.lc.read().unwrap().supported_encoding {
|
let (encoding_264, encoding_265) = self.lc.read().unwrap().supported_encoding.unwrap_or_default();
|
||||||
h264 = h264 && encoding_264;
|
h264 = h264 && encoding_264;
|
||||||
h265 = h265 && encoding_265;
|
h265 = h265 && encoding_265;
|
||||||
}
|
|
||||||
return (h264, h265);
|
return (h264, h265);
|
||||||
}
|
}
|
||||||
(false, false)
|
(false, false)
|
||||||
@ -1119,6 +1118,7 @@ impl<T: InvokeUiSession> Interface for Session<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn handle_peer_info(&mut self, mut pi: PeerInfo) {
|
fn handle_peer_info(&mut self, mut pi: PeerInfo) {
|
||||||
|
log::debug!("handle_peer_info :{:?}", pi);
|
||||||
pi.username = self.lc.read().unwrap().get_username(&pi);
|
pi.username = self.lc.read().unwrap().get_username(&pi);
|
||||||
if pi.current_display as usize >= pi.displays.len() {
|
if pi.current_display as usize >= pi.displays.len() {
|
||||||
pi.current_display = 0;
|
pi.current_display = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user