Move scaling filters and definitions before deinterlacing

This commit is contained in:
Petr Janda 2019-12-06 05:52:40 +10:30
parent 7d2bfabb32
commit 9ee0804407
1 changed files with 5 additions and 6 deletions

View File

@ -1978,12 +1978,6 @@ namespace MediaBrowser.Controller.MediaEncoding
filters.Add("hwupload=extra_hw_frames=64");
}
var inputWidth = videoStream?.Width;
var inputHeight = videoStream?.Height;
var threeDFormat = state.MediaSource.Video3DFormat;
filters.AddRange(GetScalingFilters(inputWidth, inputHeight, threeDFormat, videoDecoder, outputVideoCodec, request.Width, request.Height, request.MaxWidth, request.MaxHeight));
if (state.DeInterlace("h264", true)
&& string.Equals(outputVideoCodec, "h264_vaapi", StringComparison.OrdinalIgnoreCase))
{
@ -2006,6 +2000,11 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
var inputWidth = videoStream?.Width;
var inputHeight = videoStream?.Height;
var threeDFormat = state.MediaSource.Video3DFormat;
filters.AddRange(GetScalingFilters(inputWidth, inputHeight, threeDFormat, videoDecoder, outputVideoCodec, request.Width, request.Height, request.MaxWidth, request.MaxHeight));
var output = string.Empty;