Browse Source

contrib: ffmpeg: fix availability #if test

It's available in macOS 10.13, not macOS 13.0 [^1].
The __builtin_available() is correct but not the #if around it.

[^1]: https://developer.apple.com/documentation/videotoolbox/vtcopysupportedpropertydictionaryforencoder(width:height:codectype:encoderspecification:encoderidout:supportedpropertiesout:)
pull/188/head
Steve Lhomme 6 months ago
committed by Felix Paul Kühne
parent
commit
34987e120c
  1. 2
      contrib/src/ffmpeg/0011-avcodec-videotoolboxenc-disable-calls-on-unsupported.patch

2
contrib/src/ffmpeg/0011-avcodec-videotoolboxenc-disable-calls-on-unsupported.patch

@ -23,7 +23,7 @@ index da7b291b03..6b263ee6e9 100644
-#if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
- if (__builtin_available(macOS 10.13, *)) {
+#if (TARGET_OS_OSX && defined(__MAC_13_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_13_0) || \
+#if (TARGET_OS_OSX && defined(__MAC_10_13) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_13) || \
+ (TARGET_OS_IOS && defined(__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0) || \
+ (TARGET_OS_TV && defined(__TVOS_11_0) && __TV_OS_VERSION_MAX_ALLOWED >= __TVOS_11_0)
+ if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, *)) {

Loading…
Cancel
Save