Commit 15a80f49 by claincly Committed by Ian Baker

Fix not ignoring invalid color info.

PiperOrigin-RevId: 526595567
parent aa4e0080
...@@ -391,8 +391,8 @@ import org.checkerframework.dataflow.qual.Pure; ...@@ -391,8 +391,8 @@ import org.checkerframework.dataflow.qual.Pure;
// populate default color info, which depends on the resolution. // populate default color info, which depends on the resolution.
return ColorInfo.SDR_BT709_LIMITED; return ColorInfo.SDR_BT709_LIMITED;
} }
if (inputFormat.colorInfo == null) { if (inputFormat.colorInfo == null || !inputFormat.colorInfo.isValid()) {
Log.d(TAG, "colorInfo is null. Defaulting to SDR_BT709_LIMITED."); Log.d(TAG, "colorInfo is null or invalid. Defaulting to SDR_BT709_LIMITED.");
return ColorInfo.SDR_BT709_LIMITED; return ColorInfo.SDR_BT709_LIMITED;
} }
return inputFormat.colorInfo; return inputFormat.colorInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment