diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2024-08-29 02:43:37 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-28 12:43:37 -0600 |
| commit | 6c8ca30f7fc02170901a969c71dc35ec8992ad02 (patch) | |
| tree | 20e674033780ce8254fd41e467c9c1fe3d03bdbc /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 8c3f3c503b4b0606e2987ed58e5228d72669afeb (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.cs | 7 |
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"); |
