aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
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/ApplicationHost.cs
parent8c3f3c503b4b0606e2987ed58e5228d72669afeb (diff)
Prevent server from starting if the ffmpeg path is invalid (#12463)
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs7
1 files changed, 6 insertions, 1 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");