From bf5f00a38315c68e8f12663b6457cf10816e362b Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 23 Nov 2023 13:24:56 -0500 Subject: [PATCH] Restore original flag behaviour --- MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index da4920d40b..539996c3ae 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -117,12 +117,17 @@ namespace MediaBrowser.MediaEncoding.Encoder /// public void SetFFmpegPath() { - // 1) Check if the --ffmpeg CLI switch has been given - var ffmpegPath = _startupOptionFFmpegPath; + // 1) Custom path stored in config/encoding xml file under tag takes precedence + var ffmpegPath = _configurationManager.GetEncodingOptions().EncoderAppPath; if (string.IsNullOrEmpty(ffmpegPath)) { - // 2) Check "ffmpeg" - ffmpegPath = "ffmpeg"; + // 2) Check if the --ffmpeg CLI switch has been given + ffmpegPath = _startupOptionFFmpegPath; + if (string.IsNullOrEmpty(ffmpegPath)) + { + // 3) Check "ffmpeg" + ffmpegPath = "ffmpeg"; + } } if (!ValidatePath(ffmpegPath))