aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorgnattu <gnattu@users.noreply.github.com>2024-08-29 02:43:37 +0800
committerGitHub <noreply@github.com>2024-08-28 12:43:37 -0600
commit6c8ca30f7fc02170901a969c71dc35ec8992ad02 (patch)
tree20e674033780ce8254fd41e467c9c1fe3d03bdbc /Emby.Server.Implementations
parent8c3f3c503b4b0606e2987ed58e5228d72669afeb (diff)
Prevent server from starting if the ffmpeg path is invalid (#12463)
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs7
-rw-r--r--Emby.Server.Implementations/ConfigurationOptions.cs3
2 files changed, 8 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index ceda0bd64..5292003f0 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -402,7 +402,12 @@ namespace Emby.Server.Implementations
ConfigurationManager.ConfigurationUpdated += OnConfigurationUpdated;
ConfigurationManager.NamedConfigurationUpdated += OnConfigurationUpdated;
- Resolve<IMediaEncoder>().SetFFmpegPath();
+ var ffmpegValid = Resolve<IMediaEncoder>().SetFFmpegPath();
+
+ if (!ffmpegValid)
+ {
+ throw new FfmpegException("Failed to find valid ffmpeg");
+ }
Logger.LogInformation("ServerId: {ServerId}", SystemId);
Logger.LogInformation("Core startup complete");
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs
index f0c267627..e86010513 100644
--- a/Emby.Server.Implementations/ConfigurationOptions.cs
+++ b/Emby.Server.Implementations/ConfigurationOptions.cs
@@ -19,7 +19,8 @@ namespace Emby.Server.Implementations
{ FfmpegAnalyzeDurationKey, "200M" },
{ PlaylistsAllowDuplicatesKey, bool.FalseString },
{ BindToUnixSocketKey, bool.FalseString },
- { SqliteCacheSizeKey, "20000" }
+ { SqliteCacheSizeKey, "20000" },
+ { FfmpegSkipValidationKey, bool.FalseString }
};
}
}