Use Math.Min
Co-authored-by: Bond-009 <bond.009@outlook.com>
This commit is contained in:
parent
2321866302
commit
447dd3aed7
|
@ -6308,7 +6308,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
return 0;
|
||||
}
|
||||
|
||||
return threads >= Environment.ProcessorCount ? Environment.ProcessorCount : threads;
|
||||
return Math.Min(threads, Environment.ProcessorCount);
|
||||
}
|
||||
|
||||
#nullable disable
|
||||
|
|
Loading…
Reference in New Issue
Block a user