|
|
@ -904,8 +904,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool ranToCompletion = false;
|
|
|
|
bool ranToCompletion = false;
|
|
|
|
|
|
|
|
|
|
|
|
await _thumbnailResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
|
|
|
|
using (await _thumbnailResourcePool.LockAsync(cancellationToken).ConfigureAwait(false))
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
StartProcess(processWrapper);
|
|
|
|
StartProcess(processWrapper);
|
|
|
|
|
|
|
|
|
|
|
@ -959,10 +958,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
StopProcess(processWrapper, 1000);
|
|
|
|
StopProcess(processWrapper, 1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_thumbnailResourcePool.Release();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;
|
|
|
|
var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;
|
|
|
|
|
|
|
|
|
|
|
|