瀏覽代碼

fix: prefer cli ffmpeg path over config file (#11219)

gnattu 1 年之前
父節點
當前提交
e2e366f6d0
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

+ 4 - 4
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

@@ -154,12 +154,12 @@ namespace MediaBrowser.MediaEncoding.Encoder
         /// </summary>
         public void SetFFmpegPath()
         {
-            // 1) Custom path stored in config/encoding xml file under tag <EncoderAppPath> takes precedence
-            var ffmpegPath = _configurationManager.GetEncodingOptions().EncoderAppPath;
+            // 1) Check if the --ffmpeg CLI switch has been given
+            var ffmpegPath = _startupOptionFFmpegPath;
             if (string.IsNullOrEmpty(ffmpegPath))
             {
-                // 2) Check if the --ffmpeg CLI switch has been given
-                ffmpegPath = _startupOptionFFmpegPath;
+                // 2) Custom path stored in config/encoding xml file under tag <EncoderAppPath> should be used as a fallback
+                ffmpegPath = _configurationManager.GetEncodingOptions().EncoderAppPath;
                 if (string.IsNullOrEmpty(ffmpegPath))
                 {
                     // 3) Check "ffmpeg"