From patchwork Fri Jun 7 09:59:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 13447 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 935F9446C9C for ; Fri, 7 Jun 2019 13:00:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7815D68A7E9; Fri, 7 Jun 2019 13:00:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E0D0A680C99 for ; Fri, 7 Jun 2019 13:00:36 +0300 (EEST) Received: by mail-pf1-f195.google.com with SMTP id u17so897683pfn.7 for ; Fri, 07 Jun 2019 03:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1RRH1499+4LSwFqe90wycZzGkZcnS91CvUrUKPSrNio=; b=q0uDi0et5+B1EPxtLpubnW+zVzJy3YAag/cIu1f8aNK9BKVkyJhN0hL5wjPKGKJla1 KK6Qt9JACNNIUTTtOyQz60rv5dse13gKtA8c11xK6c9qo6LlxyDZbCsdOoAFkD6ees6j QpOJ7bW+Z/zrc98Jy4XIZzrz8ZUW1jl0DS6mvLkvNks+AZOg04+er9S9sreZIf3fibDa EJAcVlFb5ZcuM9waKBUuuAaWsMk+bsGOXiAS520k2fgYyh2idxYpCaMjJeKXysSUNpU4 zCLMZk+CJ+DPjwAa34nF4KamZH/OlQDWnDFN1KHKgLtrlKFFEvq/ZtnqmmuJPQ1v1brv 5FQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1RRH1499+4LSwFqe90wycZzGkZcnS91CvUrUKPSrNio=; b=HE8UUptfGmkJI61akKr/coanhjMK9H8N+VnUPfrtxmhiO8rRToR7ym8AGAPlp0EJxX ehojybT025YwpXyFBpX2zD6kq4hKJ/QrlzFr610QeLw9J8qc473mbkry8CbHqt3oq5kE RLurk8lAhnXhQ9PCkIJopkBpK+uYqy2cjAC/+LgFVqoI48DeKK0UBrp989ogN3HIJv+J YKz3xNigZ+HXdikS95lz36aQDp8K8LdXkOnirHZunLF95ZKoyXIUks6T99dVMQda9jaF qzv52OdBlXg0daiwU7Dt58QHX01DRPnf5zFcCN5i8b9btNaXjnXp9jCw1BY6Giefx+S0 IiJw== X-Gm-Message-State: APjAAAV3wLMgnaEmgGgWLM0+o60wOjOQCpdvQgF8l2anwIOBI+Djnh+u lUvT56YPHmBEqc2pD8LgzW625qTHz0o= X-Google-Smtp-Source: APXvYqz4IcLfpv218YAWlRtm3qPkMCWwuImn/+LD9NCsGT2sq01soNYBEdsm5RMdsJpmYcDfpkJy3A== X-Received: by 2002:a63:4001:: with SMTP id n1mr657643pga.382.1559901634458; Fri, 07 Jun 2019 03:00:34 -0700 (PDT) Received: from localhost.localdomain ([47.90.99.151]) by smtp.gmail.com with ESMTPSA id g18sm1857237pfo.136.2019.06.07.03.00.32 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 07 Jun 2019 03:00:33 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 7 Jun 2019 17:59:37 +0800 Message-Id: <1559901577-34240-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 2.6.4 Subject: [FFmpeg-devel] [PATCH] libavcodec/videotoolboxenc: Fix for the compiler error for my old mac pro X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" From: Limin Wang Signed-off-by: Limin Wang --- 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); }