avutil/hwcontext_videotoolbox: Fix version check

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Zhao Zhili 2024-07-08 14:30:38 +08:00 committed by Paul B Mahol
parent 2a543a9cf1
commit 73ce21d1f1

View File

@ -588,7 +588,7 @@ static int vt_pixbuf_set_colorspace(void *log_ctx,
} else
CVBufferRemoveAttachment(pixbuf, kCVImageBufferGammaLevelKey);
if (__builtin_available(macOS 10.8, iOS 10, *)) {
if (__builtin_available(macOS 12.0, iOS 15.0, *)) {
CFDictionaryRef attachments = CVBufferCopyAttachments(pixbuf, kCVAttachmentMode_ShouldPropagate);
if (attachments) {
colorspace = CVImageBufferCreateColorSpaceFromAttachments(attachments);