Camera (macOS): fix crashing on old macOS version

Fix #1594
This commit is contained in:
李通洲
2025-03-02 10:20:06 +08:00
parent 64f9e53a36
commit 334afc9838
+2 -1
View File
@@ -19,7 +19,8 @@ const char* ffDetectCamera(FFlist* result)
AVCaptureDeviceType deviceType = NULL;
#ifdef MAC_OS_VERSION_14_0
if (@available(macOS 14.0, *))
// Strangely `@available(macOS 14.0, *)` doesn't work here (#1594)
if (@available(macOS 14.0, *) && &AVCaptureDeviceTypeExternal)
{
deviceType = AVCaptureDeviceTypeExternal;
}