update crates, and set new default #cpu

This commit is contained in:
rustdesk
2022-01-24 02:26:07 +08:00
parent 98aa410683
commit a3511d9157
6 changed files with 80 additions and 74 deletions

View File

@@ -188,7 +188,7 @@ fn run(sp: GenericService) -> ResultType<()> {
speed,
};
let mut vpx;
match Encoder::new(&cfg, 0) {
match Encoder::new(&cfg, (num_cpus::get() / 2) as _) {
Ok(x) => vpx = x,
Err(err) => bail!("Failed to create encoder: {}", err),
}