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: 7297431f23
This commit is contained in:
parent
e251f1483f
commit
d5ea136dc5
|
@ -1790,7 +1790,8 @@ namespace Jellyfin.Api.Controllers
|
|||
|| string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (EncodingHelper.IsCopyCodec(codec)
|
||||
&& (string.Equals(state.VideoStream.CodecTag, "dovi", StringComparison.OrdinalIgnoreCase)
|
||||
&& (string.Equals(state.VideoStream.VideoRangeType, "DOVI", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(state.VideoStream.CodecTag, "dovi", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(state.VideoStream.CodecTag, "dvh1", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(state.VideoStream.CodecTag, "dvhe", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user