[FFmpeg-devel] [PATCH] Fix build failure on macos 10.12
Pavel Koshevoy
pkoshevoy at gmail.com
Mon Jul 26 04:26:54 EEST 2021
---
libavutil/hwcontext_videotoolbox.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
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;
--
2.26.2
More information about the ffmpeg-devel
mailing list