From patchwork Thu Dec 2 13:20:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31881 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp80270iog; Thu, 2 Dec 2021 05:20:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5m6kcTqfsRK7I1rydNGOUTA4xbpmg2tmklQs3u/21HPtBmwLbny5XFGZpElPrUsYz+EaF X-Received: by 2002:a50:9510:: with SMTP id u16mr17657545eda.134.1638451259055; Thu, 02 Dec 2021 05:20:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638451259; cv=none; d=google.com; s=arc-20160816; b=ScIe6Z5qoDCXoxLf4sb/yS2PkM4Bu+Q6EX0VYgoDYyRFTNK2Sk7Ff8mtdpg2wb9+FJ xF6MBFxjdEk34XZg0txJp6OGD5hK4eZmnN2Dy5CLKT+SiaiQY4DHUtEUr16JS0+HMiDf TYeXQqWsYp9RJQwyDM9A6dl7haDuTvagZTaDLccD7QSTKPc28SZQW82W5euF5GmxAx2a dP08eunJQs0QWGZst6ad9SAiuqcyeRz6RZeHojm/gBI1p5oVn2Bb5gpOdXFp3KPSSdmC 5CnJp0g2fQ75IFmPZmSjRxAvN6n1dcVZWRy7JDGRUCQxX+rtQhAruky1tzDfXcvWdu4a wsJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=ClMgLdT6AYcQhzgFStuOe6uH41trevcjdJJq70SVtFI=; b=T2fe8+92c5JLfbZQ5w+JEJnE0lkU4h3RLbdVs0tH2jniz3XBJLoL3xV8cUoqEKS4Fg lWBYcwN66e9Gkx+v32gnl2dJY4Bj9PTvwPVR9cxMm7IDlNdYxHzQvRdtf5EXhHPDIk1l 24DpX6b3ecdjnI1CN9CBrqtDbGUMyZLWxwTFXEg+RBEn9g3lxdUonsgkuCl3WmQThrFu 0zoZ4NgTY0yq9in5Ic9RNDR19KEEZ6zVOGUYMLhJx+SLF0nn8YWqzxsqz3Hk2jJ/T3VI FuXKxHG+IjWVJe0rcffz6QgBMn1KUEkbBlew5rNoave82xji2xCLfuHsL2RLAa1V9sl+ Z+HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="FtdUS/q2"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cs14si5372903ejc.311.2021.12.02.05.20.58; Thu, 02 Dec 2021 05:20:59 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="FtdUS/q2"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B241A68AF76; Thu, 2 Dec 2021 15:20:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6FB6B68AF7A for ; Thu, 2 Dec 2021 15:20:49 +0200 (EET) Received: by mail-pj1-f52.google.com with SMTP id j6-20020a17090a588600b001a78a5ce46aso2473847pji.0 for ; Thu, 02 Dec 2021 05:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=yBxcu1KhgKAe2NE63lWP9tER71DZ7DSe7cbPFpdpdxo=; b=FtdUS/q2AZ0fvF2H9OMsh8X4GQoUgFpN99P/D4/YxL4k7rR72tbkLQ/kx07FUJM4ld wIKwCfEffqNwqtWbBDOF77qxTvc0zmTcM0B1qF61k1mw+6WRmyNho81k6vsYKnrS9GUR RWXLP2xyDmeRrc/K0wJRIiYc3daMwI3TCLbFaaPzv1iQxjztC8BiKa5xjVT9X/VR6Smd hxUaSNq9DLeGJgFLeN12/32+nOms7nRgrVT4Su60RqLE3RPyDNhXLTx1Te5bFPmjlIYZ kGNB9NPMpPxOhfHNEngdzDKLepRNqjXE7Ztyj2eTf5+9Odzn2S+vwRsopHMIVgaaivz8 jjeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yBxcu1KhgKAe2NE63lWP9tER71DZ7DSe7cbPFpdpdxo=; b=p0/xyVytIXQzFkdlwAb11eONCeB0SIyvUoJNzrodbHS86vmEMkcaNVsIoms6Wd536k LxL/NZpn8GBb1revZGnn/0L4fNnu9OAxQvAXRiBlzJ0SKdzFF1/3M50TEUKHv5QbSbZs 3XcrGJGiux/a805iwDYWANGLkZt5vHtbTZUc2iH3mqg+U3dd8Snw9tIBNNkS34RJtaz+ r0SMrF9C3FlQgnkyA5R5DRs8ZiQD2TK2M7dmjrYv/wYdMg2SuJBwuekhREGkexgVV88V oSp6LqFjgW+B8tGnGatQLU67gdhKnrOmTmNQjuHSIviTLNV2c1snMBngyJX0YPHgc33R 3qPQ== X-Gm-Message-State: AOAM531cC8GDqVxK1j7LL9aqtIe+gfC9q8gdJC8nJMj0wDwZ57uQ2bBV 2pRY2e6MGr24jTSNUxvG5JEhwqsYOG8= X-Received: by 2002:a17:90a:8c0f:: with SMTP id a15mr5920306pjo.25.1638451247540; Thu, 02 Dec 2021 05:20:47 -0800 (PST) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id v38sm2553941pgl.38.2021.12.02.05.20.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Dec 2021 05:20:47 -0800 (PST) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 2 Dec 2021 21:20:42 +0800 Message-Id: <1638451242-24362-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH] avcodec/videotoolbox: fix use of unknown builtin '__builtin_available' X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6EqKzNRTpL66 From: Limin Wang Old system is: OSX version: 10.11.6 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin15.6.0 Signed-off-by: Limin Wang --- libavcodec/videotoolbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 284da97..195706c 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -895,7 +895,7 @@ static int videotoolbox_start(AVCodecContext *avctx) break; } -#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) +#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) && AV_HAS_BUILTIN(__builtin_available) if (avctx->codec_id == AV_CODEC_ID_PRORES) { if (__builtin_available(macOS 10.9, *)) { VTRegisterProfessionalVideoWorkflowVideoDecoders(); @@ -903,7 +903,7 @@ static int videotoolbox_start(AVCodecContext *avctx) } #endif -#if defined(MAC_OS_VERSION_11_0) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0) +#if __clang_major__ >= 9 && defined(MAC_OS_VERSION_11_0) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0) && AV_HAS_BUILTIN(__builtin_available) if (__builtin_available(macOS 11.0, *)) { VTRegisterSupplementalVideoDecoderIfAvailable(videotoolbox->cm_codec_type); }