From patchwork Sat Mar 17 11:44:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 8020 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp565160jad; Sat, 17 Mar 2018 04:44:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELtooVqLppfcl/spn6fmcjgLsR04eacMQTXUan1/D8AsbCEazaCBzqfdGviVZei9gF2zIk8X X-Received: by 10.28.105.78 with SMTP id e75mr2250298wmc.7.1521287070699; Sat, 17 Mar 2018 04:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521287070; cv=none; d=google.com; s=arc-20160816; b=jqweQ4Ab71W2M1YSTvdrjYfhbAUNsvtEkDDrRo8HQOa31GlPDoz++hOqc7vz+7he8G u9FKWHcH9o4BW4znAsrBV675Oy37ZYq/X8mvM43hd1qSyxQMjKi8p6cCDYbntW7ui+Jn GKJTBo76xJIGV6hKETMPbEjzfXCRqY8r4aFY/gUfA/I3c/iDvoPqktFK+5SHtIFqCysY OBg8KZAEigQqD99iEqAqASIjHH3cNinR3flAxgYQMtMwCxa8VcC9q2vrA9eRHhr0sRgf WLq3J2JlkzLB2VrizeogfxVc/ecvGAWG7KcEQo7PhoeDCb2sOFmqEMqPCg6vJeOBoeKy iugw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=Rus/ShSyoi71HGTVy8TO5ZWU9a5/YxY0Z6BbUdCyGY0=; b=pfYxFys4OwnP7bG7TyzaswynPzOCqoaC2b4mKfC6jQheGXGxe2NOvnPuSOspR98mSC fV4BdvIKKdeizHet1t7gIFQLQjjsWf2B0S0FVHFWQ8haNLw9gBHISvS2dj9SOT7UE0cT yDCqey51i45mEVC/ueyRo3UiywbBlKfwX5Olo0xq6LayWfOu0NRTJttBVguOQV7nI/PT M3R2cGD2JQKMooD90PJOJyFOl7dsPMuHHv4N75CCiYqpnHoViT3vYrZJjVFatx0hkh17 hcFzSo6+RUfR3E2a2dlk9rzyRp/h8J0Ul18PVf2KC9WsVVgGQGJwYJaWl5QPHbfrhBMO k7wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cvhu1aCE; 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 4si5596297wmt.144.2018.03.17.04.44.29; Sat, 17 Mar 2018 04:44:30 -0700 (PDT) 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=20161025 header.b=cvhu1aCE; 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 5DDF36897AC; Sat, 17 Mar 2018 13:44:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 981BF689908 for ; Sat, 17 Mar 2018 13:44:08 +0200 (EET) Received: by mail-io0-f173.google.com with SMTP id f1so15574120iob.0 for ; Sat, 17 Mar 2018 04:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Q8EqFQc8+CAuGi18mNhQeoxPC+URObdROu9dkauCuOg=; b=cvhu1aCE8GZbDlOfUzK9T+ogQgXIG4R3LEfCg7xK2N4joAcfWV6V9DvNUYSt+Tzoav PMOPyzLUoWK3WWYRTySZeX0VVNRLF6uW0QFl4znAmEcal3F9iLrRt+HH8eu0IacnqGLM RAf8MUNtYaTxD+yR0vpnmjJysNMw9gk5m7iqPbpMWQO7rD7lPttP6Is33+DMNl01Fd9f afxBr0JuMkxcWeme1mECSVxRbLFp8In9n0EAFApgzWJCS30XYP29rc3L+gtpkS/4iZAp BxwAGHcfrGJFeW7vaVZ9G7b3vMHB4R8Bszlrxm9mnZsIvH1YPX2KJnhJqkPLLiz01VpS ZUkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Q8EqFQc8+CAuGi18mNhQeoxPC+URObdROu9dkauCuOg=; b=R1w9PA2dvSzqAsocO8stJs45qT4q7Znmor5qTfwTUMBMhzkqNxJ6Ra1/6f9Gs/QS4z FXzKFctMuABdfKttpja5Q4eJXJtImvi8bL5nS6By4JSANK9nDKWlZKkwlQRfgx6gPQZ3 o2WK88TefDnuJnju04/k3cKEImo47rqcs0oLOUAP6GPUF9iZxpWsHZxwlzwYZFDdPyAg zzGkbLn3CUB4o88UtXNCalTiQ7QahJDNBiMB4OeFI7v+XspPwbw3rYlV79tlzx2Bq27/ nBzToyLlewhd3b7aEjEj6B2IWmHIPgnaatTRAmkSdOJb/3btDcKbk3Y/UFO3CkeY9g2O 0GKw== X-Gm-Message-State: AElRT7Fz+mRepwSIzAdRSn6VruR5hNR49SomDzk+EPAuekqaMeCbwg8N JC78LIHVVOiEi/6TJf8mD84fOrzitDXpPlz3+EQ= X-Received: by 10.107.39.138 with SMTP id n132mr5444361ion.91.1521287060289; Sat, 17 Mar 2018 04:44:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.3.78 with HTTP; Sat, 17 Mar 2018 04:44:19 -0700 (PDT) From: Carl Eugen Hoyos Date: Sat, 17 Mar 2018 12:44:19 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavu/hwcontext_vaapi: Only compile vaapi_unmap_to_drm if it will be used 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch is supposed to silence a warning on some systems (seen on Debian logs). Please test and review, Carl Eugen From 841d9ed2db4f3e071ecc681e4f50ff61df2ea358 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 17 Mar 2018 12:42:07 +0100 Subject: [PATCH] lavu/hwcontext_vaapi: Only compile vaapi_unmap_to_drm if it will be used. Fixes a warning: libavutil/hwcontext_vaapi.c:1064:13: warning: 'vaapi_unmap_to_drm' defined but not used --- libavutil/hwcontext_vaapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index af9a136..6cc641a 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -1073,6 +1073,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst, return 0; } +#if VA_CHECK_VERSION(1, 1, 0) static void vaapi_unmap_to_drm(AVHWFramesContext *dst_fc, HWMapDescriptor *hwmap) { @@ -1088,7 +1089,6 @@ static void vaapi_unmap_to_drm(AVHWFramesContext *dst_fc, static int vaapi_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src, int flags) { -#if VA_CHECK_VERSION(1, 1, 0) AVVAAPIDeviceContext *hwctx = hwfc->device_ctx->hwctx; VASurfaceID surface_id; VAStatus vas; @@ -1182,7 +1182,7 @@ static int vaapi_map_from(AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src, int flags) { switch (dst->format) { -#if CONFIG_LIBDRM +#if CONFIG_LIBDRM && VA_CHECK_VERSION(1, 1, 0) case AV_PIX_FMT_DRM_PRIME: return vaapi_map_to_drm(hwfc, dst, src, flags); #endif -- 1.7.10.4