Apply suggestions from code review

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
pull/6475/head
Cody Robibero 3 years ago committed by GitHub
parent 611c20dba8
commit 3f2c706575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save