mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
switch to hwaccel auto
This commit is contained in:
@@ -49,11 +49,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
/// </summary>
|
||||
private readonly SemaphoreSlim _thumbnailResourcePool = new SemaphoreSlim(1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// The FF probe resource pool
|
||||
/// </summary>
|
||||
private readonly SemaphoreSlim _ffProbeResourcePool = new SemaphoreSlim(2, 2);
|
||||
|
||||
public string FFMpegPath { get; private set; }
|
||||
|
||||
public string FFProbePath { get; private set; }
|
||||
@@ -591,20 +586,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
|
||||
using (var processWrapper = new ProcessWrapper(process, this, _logger))
|
||||
{
|
||||
await _ffProbeResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
try
|
||||
{
|
||||
StartProcess(processWrapper);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ffProbeResourcePool.Release();
|
||||
|
||||
_logger.ErrorException("Error starting ffprobe", ex);
|
||||
|
||||
throw;
|
||||
}
|
||||
StartProcess(processWrapper);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -655,10 +637,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_ffProbeResourcePool.Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user