[FFmpeg-devel] [PATCH] avfilter/vf_delogo: use av_log_once
quinkblack at foxmail.com
quinkblack at foxmail.com
Wed Sep 16 09:37:38 EEST 2020
From: Zhao Zhili <quinkblack at foxmail.com>
---
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",
--
2.17.1
More information about the ffmpeg-devel
mailing list