fix startup on systems unsupported by nvencsharp (#2678)

This commit is contained in:
Jason Dove
2025-11-30 06:26:57 -06:00
committed by GitHub
parent 7bd8cefe2e
commit b45c22092d
5 changed files with 22 additions and 0 deletions
+2
View File
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Fixed
- Fix startup on systems unsupported by NvEncSharp
## [25.9.0] - 2025-11-29
### Added
@@ -151,6 +151,10 @@ public partial class HardwareCapabilitiesFactory(
{
// do nothing
}
catch (TypeInitializationException)
{
// do nothing
}
// if we don't have a list of cuda devices, fall back to ffmpeg check
@@ -644,6 +648,10 @@ public partial class HardwareCapabilitiesFactory(
{
// do nothing
}
catch (TypeInitializationException)
{
// do nothing
}
logger.LogWarning(
"Error detecting NVIDIA GPU capabilities; some hardware accelerated features will be unavailable");
@@ -16,6 +16,10 @@ public static class NvEncSharpRedirector
{
CudaHelper.IsLoaded = false;
}
catch (TypeInitializationException)
{
CudaHelper.IsLoaded = false;
}
}
private static IntPtr Resolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
@@ -463,6 +463,10 @@ public class TranscodingTests
{
// do nothing
}
catch (TypeInitializationException)
{
// do nothing
}
var localFileSystem = new LocalFileSystem(
new MockFileSystem(),
@@ -27,6 +27,10 @@ public class PlatformSettingsService(IServiceScopeFactory serviceScopeFactory) :
{
// do nothing
}
catch (TypeInitializationException)
{
// do nothing
}
}
if (runtimeInfo.IsOSPlatform(OSPlatform.Linux))