probe Main/High 10 more specifically

This commit is contained in:
Nyanmisaka 2020-04-11 01:19:28 +08:00 committed by GitHub
parent dd3f3089ef
commit 6485c1eabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2000,7 +2000,8 @@ namespace MediaBrowser.Controller.MediaEncoding
&& string.Equals(outputVideoCodec, "libx264", StringComparison.OrdinalIgnoreCase))
{
var codec = videoStream.Codec.ToLowerInvariant();
var IsColorDepth10 = (videoStream.Profile ?? string.Empty).IndexOf("10", StringComparison.OrdinalIgnoreCase) != -1;
var IsColorDepth10 = (videoStream.Profile ?? string.Empty).IndexOf("Main 10", StringComparison.OrdinalIgnoreCase) != -1
|| (videoStream.Profile ?? string.Empty).IndexOf("High 10", StringComparison.OrdinalIgnoreCase) != -1;
// Assert 10-bit hardware VAAPI decodable
if (IsColorDepth10 && (string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase)