Fix MJPEG hwenc may be incorrectly enabled on AMDGPU (#12695)

pull/12704/head
Nyanmisaka 4 months ago committed by GitHub
parent 3c639c2e80
commit cb8f01065a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -209,6 +209,14 @@ namespace MediaBrowser.Controller.MediaEncoding
{
var hwType = encodingOptions.HardwareAccelerationType;
// Only Intel has VA-API MJPEG encoder
if (hwType == HardwareAccelerationType.vaapi
&& !(_mediaEncoder.IsVaapiDeviceInteliHD
|| _mediaEncoder.IsVaapiDeviceInteli965))
{
return _defaultMjpegEncoder;
}
if (hwType != HardwareAccelerationType.none
&& encodingOptions.EnableHardwareEncoding
&& _mjpegCodecMap.TryGetValue(hwType, out var preferredEncoder)

Loading…
Cancel
Save