mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
Set the name of intel vaapi driver explicitly
Fix crashes on older intel gfx when both iHD and i965 driver are existed.
This commit is contained in:
parent
136eab9b1e
commit
de4a084b03
@ -581,13 +581,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
options);
|
||||
}
|
||||
|
||||
private string GetVaapiDeviceArgs(string renderNodePath, string kernelDriver, string driver, string alias)
|
||||
private string GetVaapiDeviceArgs(string renderNodePath, string driver, string kernelDriver, string alias)
|
||||
{
|
||||
alias ??= VaapiAlias;
|
||||
renderNodePath = renderNodePath ?? "/dev/dri/renderD128";
|
||||
var options = string.IsNullOrEmpty(kernelDriver) || string.IsNullOrEmpty(driver)
|
||||
var options = string.IsNullOrEmpty(driver)
|
||||
? renderNodePath
|
||||
: ",kernel_driver=" + kernelDriver + ",driver=" + driver;
|
||||
: ",driver=" + driver + (string.IsNullOrEmpty(kernelDriver) ? string.Empty : ",kernel_driver=" + kernelDriver);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
@ -602,7 +602,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
if (OperatingSystem.IsLinux())
|
||||
{
|
||||
// derive qsv from vaapi device
|
||||
return GetVaapiDeviceArgs(null, "i915", "iHD", VaapiAlias) + arg + "@" + VaapiAlias;
|
||||
return GetVaapiDeviceArgs(null, "iHD", "i915", VaapiAlias) + arg + "@" + VaapiAlias;
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
@ -691,7 +691,19 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
args.Append(GetVaapiDeviceArgs(options.VaapiDevice, null, null, VaapiAlias));
|
||||
if (_mediaEncoder.IsVaapiDeviceInteliHD)
|
||||
{
|
||||
args.Append(GetVaapiDeviceArgs(null, "iHD", null, VaapiAlias));
|
||||
}
|
||||
else if (_mediaEncoder.IsVaapiDeviceInteli965)
|
||||
{
|
||||
args.Append(GetVaapiDeviceArgs(null, "i965", null, VaapiAlias));
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Append(GetVaapiDeviceArgs(options.VaapiDevice, null, null, VaapiAlias));
|
||||
}
|
||||
|
||||
var filterDevArgs = GetFilterHwDeviceArgs(VaapiAlias);
|
||||
|
||||
if (isHwTonemapAvailable && IsOpenclFullSupported())
|
||||
|
Loading…
Reference in New Issue
Block a user