Browse Source

fix bt709 check (#1039)

pull/1040/head
Jason Dove 4 years ago committed by GitHub
parent
commit
32edf77d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      ErsatzTV.FFmpeg/ColorParams.cs

16
ErsatzTV.FFmpeg/ColorParams.cs

@ -10,5 +10,19 @@ public record ColorParams(string ColorRange, string ColorSpace, string ColorTran
string.IsNullOrWhiteSpace(ColorTransfer) && string.IsNullOrWhiteSpace(ColorTransfer) &&
string.IsNullOrWhiteSpace(ColorPrimaries); string.IsNullOrWhiteSpace(ColorPrimaries);
public bool IsBt709 => this == Default; public bool IsBt709
{
get
{
if (this == Default)
{
return true;
}
// some sources don't set transfer and primaries metadata
return ColorRange == "tv" && ColorSpace == "bt709"
&& string.IsNullOrWhiteSpace(ColorTransfer)
&& string.IsNullOrWhiteSpace(ColorPrimaries);
}
}
} }

Loading…
Cancel
Save