Simplify condition check
Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
0340eccb52
commit
b28d22545a
|
@ -814,10 +814,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
var options = allowHwAccel ? _configurationManager.GetEncodingOptions() : new EncodingOptions();
|
||||
threads ??= _threads;
|
||||
|
||||
if (enableKeyFrameOnlyExtraction)
|
||||
if (allowHwAccel && enableKeyFrameOnlyExtraction)
|
||||
{
|
||||
var supportsKeyFrameOnly = !allowHwAccel
|
||||
|| (string.Equals(options.HardwareAccelerationType, "nvenc", StringComparison.OrdinalIgnoreCase) && options.EnableEnhancedNvdecDecoder)
|
||||
var supportsKeyFrameOnly = (string.Equals(options.HardwareAccelerationType, "nvenc", StringComparison.OrdinalIgnoreCase) && options.EnableEnhancedNvdecDecoder)
|
||||
|| (string.Equals(options.HardwareAccelerationType, "amf", StringComparison.OrdinalIgnoreCase) && OperatingSystem.IsWindows() && options.PreferSystemNativeHwDecoder)
|
||||
|| (string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase) && options.PreferSystemNativeHwDecoder)
|
||||
|| string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase)
|
||||
|
|
Loading…
Reference in New Issue
Block a user