mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-16 04:30:24 +01:00
Fix image encoding concurrency limit (#13532)
* Fix image encoding concurrency limit The current FFmpeg image extractor is configured to use a resource pool size that always equals 2 times the number of CPU cores, which is somewhat excessive. Make the default equal to the core count instead of twice, and respect the `ParallelImageEncodingLimit` option. * Fix code stype * Check null value for unit tests
This commit is contained in:
@@ -66,7 +66,7 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
|
||||
var semaphoreCount = config.Configuration.ParallelImageEncodingLimit;
|
||||
if (semaphoreCount < 1)
|
||||
{
|
||||
semaphoreCount = 2 * Environment.ProcessorCount;
|
||||
semaphoreCount = Environment.ProcessorCount;
|
||||
}
|
||||
|
||||
_parallelEncodingLimit = new(semaphoreCount);
|
||||
|
||||
Reference in New Issue
Block a user