mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-02-05 04:02:26 +00:00
add error handling to work around skia crashes
This commit is contained in:
@@ -9,6 +9,7 @@ using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using Emby.Drawing.Skia;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
|
||||
namespace MediaBrowser.Server.Startup.Common
|
||||
{
|
||||
@@ -20,13 +21,14 @@ namespace MediaBrowser.Server.Startup.Common
|
||||
StartupOptions startupOptions,
|
||||
Func<IHttpClient> httpClient,
|
||||
IApplicationPaths appPaths,
|
||||
IEnvironmentInfo environment)
|
||||
IEnvironmentInfo environment,
|
||||
ILocalizationManager localizationManager)
|
||||
{
|
||||
if (!startupOptions.ContainsOption("-enablegdi"))
|
||||
{
|
||||
try
|
||||
{
|
||||
return new SkiaEncoder(logManager.GetLogger("Skia"), appPaths, httpClient, fileSystem);
|
||||
return new SkiaEncoder(logManager.GetLogger("Skia"), appPaths, httpClient, fileSystem, localizationManager);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user