diff mbox series

[FFmpeg-devel] Fix build failure on macos 10.12

Message ID 20210726012654.17807-1-pkoshevoy@gmail.com
State New
Headers show
Series [FFmpeg-devel] Fix build failure on macos 10.12
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Pavel Koshevoy July 26, 2021, 1:26 a.m. UTC
---
 libavutil/hwcontext_videotoolbox.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c
index 58095a1fc9..99e117aca3 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -420,10 +420,11 @@  static int vt_pixbuf_set_colorspace(AVHWFramesContext *hwfc,
 
     switch (src->color_trc) {
     case AVCOL_TRC_SMPTE2084:
-        if (__builtin_available(macOS 10.13, *))
+        #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_SMPTE_ST_2084_PQ
             colortrc = kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
-        else
+        #else
             colortrc = CFSTR("SMPTE_ST_2084_PQ");
+        #endif
         break;
     case AVCOL_TRC_BT2020_10:
     case AVCOL_TRC_BT2020_12:
@@ -445,10 +446,11 @@  static int vt_pixbuf_set_colorspace(AVHWFramesContext *hwfc,
             colortrc = CFSTR("SMPTE_ST_428_1");
         break;
     case AVCOL_TRC_ARIB_STD_B67:
-        if (__builtin_available(macOS 10.13, *))
+        #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
             colortrc = kCVImageBufferTransferFunction_ITU_R_2100_HLG;
-        else
+        #else
             colortrc = CFSTR("ITU_R_2100_HLG");
+        #endif
         break;
     case AVCOL_TRC_GAMMA22:
         gamma = 2.2;