From 6c8ca30f7fc02170901a969c71dc35ec8992ad02 Mon Sep 17 00:00:00 2001 From: gnattu Date: Thu, 29 Aug 2024 02:43:37 +0800 Subject: Prevent server from starting if the ffmpeg path is invalid (#12463) --- Emby.Server.Implementations/ApplicationHost.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/ApplicationHost.cs') 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().SetFFmpegPath(); + var ffmpegValid = Resolve().SetFFmpegPath(); + + if (!ffmpegValid) + { + throw new FfmpegException("Failed to find valid ffmpeg"); + } Logger.LogInformation("ServerId: {ServerId}", SystemId); Logger.LogInformation("Core startup complete"); -- cgit v1.2.3