mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-05 21:33:02 +02:00
Apply suggestions from code review
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
parent
611c20dba8
commit
3f2c706575
|
@ -3306,7 +3306,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
inputModifier += " " + videoDecoder;
|
inputModifier += " " + videoDecoder;
|
||||||
|
|
||||||
if (!IsCopyCodec(state.OutputVideoCodec)
|
if (!IsCopyCodec(state.OutputVideoCodec)
|
||||||
&& videoDecoder.IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1)
|
&& videoDecoder.Contains("cuvid", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
var videoStream = state.VideoStream;
|
var videoStream = state.VideoStream;
|
||||||
var inputWidth = videoStream?.Width;
|
var inputWidth = videoStream?.Width;
|
||||||
|
@ -3315,7 +3315,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
var (width, height) = GetFixedOutputSize(inputWidth, inputHeight, request.Width, request.Height, request.MaxWidth, request.MaxHeight);
|
var (width, height) = GetFixedOutputSize(inputWidth, inputHeight, request.Width, request.Height, request.MaxWidth, request.MaxHeight);
|
||||||
|
|
||||||
if (videoDecoder.IndexOf("cuvid", StringComparison.OrdinalIgnoreCase) != -1
|
if (videoDecoder.Contains("cuvid", StringComparison.OrdinalIgnoreCase)
|
||||||
&& width.HasValue
|
&& width.HasValue
|
||||||
&& height.HasValue)
|
&& height.HasValue)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue