On 7 Jun 2019, at 11:59, lance.lmw...@gmail.com wrote:
From: Limin Wang <lance.lmw...@gmail.com>
Signed-off-by: Limin Wang <lance.lmw...@gmail.com>
This looks like a different approach to a similar patch sent before
by Thilo.
---
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
I do not think this can ever reach the else branch, as
kCVPixelFormatType_420YpCbCr10BiPlanarFullRange is not
a define but a normal symbol and the preprocessor can not
check for symbols using ifdef, just for defines.
*av_pixel_format = range == AVCOL_RANGE_JPEG ?
kCVPixelFormatType_420YpCbCr10BiPlanarFullRange
:
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange;
*av_pixel_format =
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange;
+#endif
} else {
return AVERROR(EINVAL);
}
--
2.6.4
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".