fix: Fix incorrect RGB pixelFormat check

This commit is contained in:
Marc Rousavy 2023-09-21 15:58:28 +02:00
parent 327aade4d8
commit 8864866f80

View File

@ -129,7 +129,7 @@ extension CameraView {
invokeOnError(.device(.pixelFormatNotSupported)) invokeOnError(.device(.pixelFormatNotSupported))
} }
case "rgb": case "rgb":
if supportedPixelFormats.contains(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) { if supportedPixelFormats.contains(kCVPixelFormatType_32BGRA) {
pixelFormatType = kCVPixelFormatType_32BGRA pixelFormatType = kCVPixelFormatType_32BGRA
} else { } else {
invokeOnError(.device(.pixelFormatNotSupported)) invokeOnError(.device(.pixelFormatNotSupported))