avdevice/avfoundation: kCVPixelFormatType_OneComponent8 only exists from 10.8 onward
authorHanspeter Niederstrasser <niederstrasser@gmail.com>
Mon, 14 Jul 2014 02:49:24 +0000 (21:49 -0500)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Jul 2014 22:40:32 +0000 (00:40 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/avfoundation.m

index df322c6..74d7811 100644 (file)
@@ -70,7 +70,9 @@ static const struct AVFPixelFormatSpec avf_pixel_formats[] = {
     { AV_PIX_FMT_YUV420P,      kCVPixelFormatType_420YpCbCr8Planar },
     { AV_PIX_FMT_NV12,         kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange },
     { AV_PIX_FMT_YUYV422,      kCVPixelFormatType_422YpCbCr8_yuvs },
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
     { AV_PIX_FMT_GRAY8,        kCVPixelFormatType_OneComponent8 },
+#endif
     { AV_PIX_FMT_NONE, 0 }
 };