From patchwork Wed Sep 16 06:37:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 22426 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 9C6BB44A0F9 for ; Wed, 16 Sep 2020 09:38:29 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7E63068B9E2; Wed, 16 Sep 2020 09:38:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from qq.com (out203-205-221-250.mail.qq.com [203.205.221.250]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3CCEE6808B2 for ; Wed, 16 Sep 2020 09:38:20 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1600238298; bh=rEqHmSYIfQ+in6GzRo9c68dY93kgVJOnMK4IOU4kA1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Kxr//c3XLlOjGuiOfIUoqkacrX9tH3aaJqxxH0M/Xty7o2HtLpBN/dasbmYRix8oF aj7SBIIc/iaSFRKHEO3VXHO90dUdLdzNuy06ad/yqTxW7nuZ1nHZmzFva+ahEw+OGs NEhlovK99gjvCs2dctM0s//mA2jStNRXuhl9ta4o= Received: from localhost.localdomain ([14.17.22.31]) by newxmesmtplogicsvrszc9.qq.com (NewEsmtp) with SMTP id 96E8D0CF; Wed, 16 Sep 2020 14:37:46 +0800 X-QQ-mid: xmsmtpt1600238266tex4bhp7y Message-ID: X-QQ-XMAILINFO: NPHwgDTHsJqjT+6SdMbb68fBCY0nCGlLKXFTWV4ZycAq+7wHPJX0pLfldKNOVq 453iP4/O7k/RVbDW1noZ0cUEPKzHChtzkaJ2Gishf93g02vt1FzUwVqd14TPdXk5OBOWBGh8wWvJ HhjKtuaDbgihtHHizXPx6KvEo71X9MVO4DtXdaopxPC0zZAATU4w1DBtL5tBLWVajXXnLuO2jF19 wMpjFS47wXeKMsKkKY8CYn3z/iaGAwU4YF13ZEC1EvtNCPVuy0kJFH/EhQA6wq8Aqxgm7TfbBgKC 05qn4V3h6oO4uKrxVx06YqaRkVzCLdfuK+jaDq7bUDan9993Dpx3Td/GBw3uJmaXEAFJVgWTRy6Z wCKGRhN/NUcs074ssd/JkYnWqkwhHoOWrqZ1oT7Y73Zj2jQ0CZ2e2ONeslNf6Ti16FlB4l/iYPMi tkPGNbhJMQtr1vr6/XuOXQCjQN/5GSE+cICbar60FhTSh9rdMwzt6xwM4jV4CEFJ3iihN/aTqS+V zAsLKifHmBbEErz0IkKn2RSvXJV02B1Vxs4Ccbn9PZ9jIwJpkbOs7PDZ4DrqK+tgQT0CnX+QZYVk PJypYtqIRZhjeRlpa48a36S39Rrc6z6sGZDvQQ7jtcfCMT6Joun3Rr5NlyNmpqffz1tbGel5z8Yq 6WrhBDj4UV7vvPDu3mtfH8Txdl69FH2sTZLgV2ee3C9m1AL0rQvvo5s2KlU19ilLufzJ+pW2JfQh sGQK+HseyclkAD2J4uO4htJw== From: quinkblack@foxmail.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 16 Sep 2020 14:37:38 +0800 X-OQ-MSGID: <20200916063738.19708-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [FFmpeg-devel] [PATCH] avfilter/vf_delogo: use av_log_once 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: Zhao Zhili MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Zhao Zhili --- libavfilter/vf_delogo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 39f06512fa..023fc51ec8 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -200,6 +200,7 @@ typedef struct DelogoContext { char *x_expr, *y_expr, *w_expr, *h_expr; AVExpr *x_pexpr, *y_pexpr, *w_pexpr, *h_pexpr; double var_values[VAR_VARS_NB]; + int log_state[2]; } DelogoContext; #define OFFSET(x) offsetof(DelogoContext, x) @@ -281,7 +282,8 @@ static int config_input(AVFilterLink *inlink) /* Check whether the logo area fits in the frame */ if (s->x + (s->band - 1) <= 0 || s->x + s->w - (s->band*2 - 2) > inlink->w || s->y + (s->band - 1) <= 0 || s->y + s->h - (s->band*2 - 2) > inlink->h) { - av_log(s, AV_LOG_WARNING, "Logo area is outside of the frame," + av_log_once(s, AV_LOG_WARNING, AV_LOG_DEBUG, s->log_state, + "Logo area is outside of the frame," " logo(x:%d y:%d w:%d h:%d), frame(%dx%d)," " auto set the area inside of the frame." " Note: x and y must be 1 at least.\n",