浏览代码

Disable auto inserted SW scaler for HW decoders in case of changed resolution

nyanmisaka 2 年之前
父节点
当前提交
04b73cace6
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

+ 7 - 0
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -931,6 +931,13 @@ namespace MediaBrowser.Controller.MediaEncoding
                 arg.Append(" -i \"").Append(state.AudioStream.Path).Append('"');
             }
 
+            // Disable auto inserted SW scaler for HW decoders in case of changed resolution.
+            var isSwDecoder = string.IsNullOrEmpty(GetHardwareVideoDecoder(state, options));
+            if (!isSwDecoder)
+            {
+                arg.Append(" -autoscale 0");
+            }
+
             return arg.ToString();
         }