mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 13:10:45 +02:00
Fixed issue
This commit is contained in:
parent
e47144e7c7
commit
420ce6a4fa
|
@ -903,9 +903,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
using (var processWrapper = new ProcessWrapper(process, this))
|
||||
{
|
||||
bool ranToCompletion = false;
|
||||
|
||||
await _thumbnailResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||
try
|
||||
|
||||
using (await _thumbnailResourcePool.LockAsync(cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
StartProcess(processWrapper);
|
||||
|
||||
|
@ -959,10 +958,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
StopProcess(processWrapper, 1000);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_thumbnailResourcePool.Release();
|
||||
}
|
||||
|
||||
var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue