Merge pull request #7129 from crobibero/null-check

This commit is contained in:
Bond-009 2022-01-07 10:31:19 +01:00 committed by GitHub
commit 98962cc21f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1278,7 +1278,7 @@ namespace MediaBrowser.Controller.MediaEncoding
param += " -pix_fmt nv21";
}
var isVc1 = string.Equals(state.VideoStream.Codec, "vc1", StringComparison.OrdinalIgnoreCase);
var isVc1 = string.Equals(state.VideoStream?.Codec, "vc1", StringComparison.OrdinalIgnoreCase);
var isLibX265 = string.Equals(videoEncoder, "libx265", StringComparison.OrdinalIgnoreCase);
if (string.Equals(videoEncoder, "libx264", StringComparison.OrdinalIgnoreCase) || isLibX265)