--- libavcodec/videotoolbox.c.orig 2022-07-21 13:09:43.000000000 -0400 +++ libavcodec/videotoolbox.c 2022-07-21 13:24:45.000000000 -0400 @@ -36,6 +36,9 @@ #include #include #include +#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) +#include +#endif #ifndef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder # define kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder CFSTR("RequireHardwareAcceleratedVideoDecoder") --- libavcodec/videotoolboxenc.c.orig 2022-01-14 13:45:40.000000000 -0500 +++ libavcodec/videotoolboxenc.c 2022-07-21 14:14:29.000000000 -0400 @@ -23,6 +23,7 @@ #include #include #include +#include #include "avcodec.h" #include "libavutil/opt.h" #include "libavutil/avassert.h" @@ -37,6 +38,9 @@ #include "h264.h" #include "h264_sei.h" #include +#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) +#include +#endif #if !HAVE_KCMVIDEOCODECTYPE_HEVC enum { kCMVideoCodecType_HEVC = 'hvc1' }; @@ -1424,11 +1428,9 @@ return AVERROR(EINVAL); } -#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) +#if defined(MAC_OS_X_VERSION_10_10) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10) if (avctx->codec_id == AV_CODEC_ID_PRORES) { - if (__builtin_available(macOS 10.10, *)) { - VTRegisterProfessionalVideoWorkflowVideoEncoders(); - } + VTRegisterProfessionalVideoWorkflowVideoEncoders(); } #endif