diff mbox series

[FFmpeg-devel] avfilter/vf_delogo: use av_log_once

Message ID tencent_2AA24543B318084D13E75366B5DC8911EE05@qq.com
State New
Headers show
Series [FFmpeg-devel] avfilter/vf_delogo: use av_log_once
Related show

Checks

Context Check Description
andriy/default pending
andriy/configure warning Failed to apply patch

Commit Message

Zhao Zhili Sept. 16, 2020, 6:37 a.m. UTC
From: Zhao Zhili <quinkblack@foxmail.com>

---
 libavfilter/vf_delogo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

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",