aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
diff options
context:
space:
mode:
authorJoshua Boniface <joshua@boniface.me>2022-08-01 14:25:45 -0400
committerJoshua Boniface <joshua@boniface.me>2022-08-01 14:25:45 -0400
commitd5ea136dc5cf41c824eb0c09afca93f5804db4be (patch)
tree18136dbf4146ee2193f82ff4617f5ce359b108ae /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
parente251f1483ff0adf299266449cc54a6c411a7d7d8 (diff)
Backport pull request #8174 from jellyfin/release-10.8.z
Disable auto inserted SW scaler for HW decoders Authored-by: nyanmisaka <nst799610810@gmail.com> Merged-by: Bond-009 <bond.009@outlook.com> Original-merge: 7297431f23a0fa1ab5aa15df93d91096a09c4f21
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 1d65f9a34..7c59fa300 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/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();
}