minor changes

This commit is contained in:
Nyanmisaka 2020-07-21 11:41:28 +08:00 committed by GitHub
parent 5f89e81306
commit d4c6415f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -460,7 +460,7 @@ namespace MediaBrowser.Controller.MediaEncoding
if (!IsCopyCodec(outputVideoCodec)) if (!IsCopyCodec(outputVideoCodec))
{ {
if (state.IsVideoRequest if (state.IsVideoRequest
&& IsVaapiSupported(state) && _mediaEncoder.SupportsHwaccel("vaapi")
&& string.Equals(encodingOptions.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase)) && string.Equals(encodingOptions.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
{ {
if (isVaapiDecoder) if (isVaapiDecoder)
@ -1701,7 +1701,7 @@ namespace MediaBrowser.Controller.MediaEncoding
} }
// If we're hardware VAAPI decoding and software encoding, download frames from the decoder first // If we're hardware VAAPI decoding and software encoding, download frames from the decoder first
else if (IsVaapiSupported(state) && videoDecoder.IndexOf("vaapi", StringComparison.OrdinalIgnoreCase) != -1 else if (_mediaEncoder.SupportsHwaccel("vaapi") && videoDecoder.IndexOf("vaapi", StringComparison.OrdinalIgnoreCase) != -1
&& string.Equals(outputVideoCodec, "libx264", StringComparison.OrdinalIgnoreCase)) && string.Equals(outputVideoCodec, "libx264", StringComparison.OrdinalIgnoreCase))
{ {
/* /*