From patchwork Thu Feb 25 06:38:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Guo, Yejun" X-Patchwork-Id: 25976 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 25B52449E75 for ; Thu, 25 Feb 2021 08:48:58 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BB7868A1E4; Thu, 25 Feb 2021 08:48:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 59025689C5C for ; Thu, 25 Feb 2021 08:48:50 +0200 (EET) IronPort-SDR: FSS9wKotMjwv/l09kZ6Ls9vxsIl6NhdEQLOOzxML0EY/lEw+5AEY8tM+c1i6l+QkKiWODb7O5k 5/E7rb+4niIA== X-IronPort-AV: E=McAfee;i="6000,8403,9905"; a="182968988" X-IronPort-AV: E=Sophos;i="5.81,205,1610438400"; d="scan'208";a="182968988" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2021 22:48:47 -0800 IronPort-SDR: 8FXdv7PatCsKJmajr5/MXi5vgUrgNTdFotORqrSpfNuNWRH3nPsYqCOfuNHtJ4rMnRVkbms5Sj 1Ip6vF2Baprw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,205,1610438400"; d="scan'208";a="404113285" Received: from yguo18-skl-u1604.sh.intel.com ([10.239.159.53]) by orsmga008.jf.intel.com with ESMTP; 24 Feb 2021 22:48:46 -0800 From: "Guo, Yejun" To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Feb 2021 14:38:12 +0800 Message-Id: <20210225063816.8644-3-yejun.guo@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210225063816.8644-1-yejun.guo@intel.com> References: <20210225063816.8644-1-yejun.guo@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V2 3/7] libavfilter/vf_vif.c: fix build warning for [-Wmain] 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: yejun.guo@intel.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" src/libavfilter/vf_vif.c: In function ‘process_frame’: src/libavfilter/vf_vif.c:542:20: warning: ‘main’ is usually a function [-Wmain] AVFrame *out, *main = NULL, *ref = NULL; ^~~~ Signed-off-by: Guo, Yejun --- libavfilter/vf_vif.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index 876c7c9120..0bd71eca5c 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -539,22 +539,22 @@ static int process_frame(FFFrameSync *fs) AVFilterContext *ctx = fs->parent; VIFContext *s = fs->opaque; AVFilterLink *outlink = ctx->outputs[0]; - AVFrame *out, *main = NULL, *ref = NULL; + AVFrame *out_frame, *main_frame = NULL, *ref_frame = NULL; int ret; - ret = ff_framesync_dualinput_get(fs, &main, &ref); + ret = ff_framesync_dualinput_get(fs, &main_frame, &ref_frame); if (ret < 0) return ret; - if (ctx->is_disabled || !ref) { - out = main; + if (ctx->is_disabled || !ref_frame) { + out_frame = main_frame; } else { - out = do_vif(ctx, main, ref); + out_frame = do_vif(ctx, main_frame, ref_frame); } - out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base); + out_frame->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base); - return ff_filter_frame(outlink, out); + return ff_filter_frame(outlink, out_frame); }