From 76deafbd7bf868562d69061e7d6abf2612a2c7ad Mon Sep 17 00:00:00 2001 From: Matt Tannahill Date: Tue, 17 Sep 2024 14:48:37 -0400 Subject: [PATCH] Fix build for Xcode < 14 --- app/streaming/video/ffmpeg-renderers/vt_base.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/streaming/video/ffmpeg-renderers/vt_base.mm b/app/streaming/video/ffmpeg-renderers/vt_base.mm index 0035394b..e3b928f8 100644 --- a/app/streaming/video/ffmpeg-renderers/vt_base.mm +++ b/app/streaming/video/ffmpeg-renderers/vt_base.mm @@ -58,6 +58,7 @@ bool VTBaseRenderer::checkDecoderCapabilities(id device, PDECODER_PAR } } else if (params->videoFormat & VIDEO_FORMAT_MASK_AV1) { + #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000 if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_AV1)) { SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "No HW accelerated AV1 decode via VT"); @@ -66,6 +67,11 @@ bool VTBaseRenderer::checkDecoderCapabilities(id device, PDECODER_PAR // 10-bit is part of the Main profile for AV1, so it will always // be present on hardware that supports 8-bit. + #else + SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, + "AV1 requires building with Xcode 14 or later"); + return false; + #endif } return true;