diff --git a/src/detection/camera/camera_apple.m b/src/detection/camera/camera_apple.m index 45da1246f..e80857744 100644 --- a/src/detection/camera/camera_apple.m +++ b/src/detection/camera/camera_apple.m @@ -16,18 +16,16 @@ const char* ffDetectCamera(FFlist* result) #ifdef MAC_OS_X_VERSION_10_15 FF_SUPPRESS_IO(); // #822 - AVCaptureDeviceType deviceType; + AVCaptureDeviceType deviceType = NULL; #ifdef MAC_OS_VERSION_14_0 if (@available(macOS 14.0, *)) { deviceType = AVCaptureDeviceTypeExternal; } - else #endif - { + if (deviceType == NULL) deviceType = AVCaptureDeviceTypeExternalUnknown; - } AVCaptureDeviceDiscoverySession* session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:@[AVCaptureDeviceTypeBuiltInWideAngleCamera, deviceType] mediaType:AVMediaTypeVideo