[FFmpeg-devel] [PATCH] libavcodec/videotoolboxenc: Fix for the compiler error for my old mac pro
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Fri Jun 7 12:59:37 EEST 2019
From: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
libavcodec/videotoolboxenc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 3665581..e4f44e5 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -763,10 +763,14 @@ static int get_cv_pixel_format(AVCodecContext* avctx,
kCVPixelFormatType_420YpCbCr8PlanarFullRange :
kCVPixelFormatType_420YpCbCr8Planar;
} else if (fmt == AV_PIX_FMT_P010LE) {
+#ifndef kCVPixelFormatType_420YpCbCr10BiPlanarFullRange
+ return AVERROR(EINVAL);
+#else
*av_pixel_format = range == AVCOL_RANGE_JPEG ?
kCVPixelFormatType_420YpCbCr10BiPlanarFullRange :
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange;
*av_pixel_format = kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange;
+#endif
} else {
return AVERROR(EINVAL);
}
--
2.6.4
More information about the ffmpeg-devel
mailing list