mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/drawtext: log why input pad failed to be configured
This commit is contained in:
parent
a13af9aee1
commit
287620f59c
|
@ -829,6 +829,7 @@ static int config_input(AVFilterLink *inlink)
|
||||||
{
|
{
|
||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
DrawTextContext *s = ctx->priv;
|
DrawTextContext *s = ctx->priv;
|
||||||
|
char *expr;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ff_draw_init(&s->dc, inlink->format, FF_DRAW_PROCESS_ALPHA);
|
ff_draw_init(&s->dc, inlink->format, FF_DRAW_PROCESS_ALPHA);
|
||||||
|
@ -854,14 +855,15 @@ static int config_input(AVFilterLink *inlink)
|
||||||
av_expr_free(s->a_pexpr);
|
av_expr_free(s->a_pexpr);
|
||||||
s->x_pexpr = s->y_pexpr = s->a_pexpr = NULL;
|
s->x_pexpr = s->y_pexpr = s->a_pexpr = NULL;
|
||||||
|
|
||||||
if ((ret = av_expr_parse(&s->x_pexpr, s->x_expr, var_names,
|
if ((ret = av_expr_parse(&s->x_pexpr, expr = s->x_expr, var_names,
|
||||||
NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 ||
|
NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 ||
|
||||||
(ret = av_expr_parse(&s->y_pexpr, s->y_expr, var_names,
|
(ret = av_expr_parse(&s->y_pexpr, expr = s->y_expr, var_names,
|
||||||
NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 ||
|
NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 ||
|
||||||
(ret = av_expr_parse(&s->a_pexpr, s->a_expr, var_names,
|
(ret = av_expr_parse(&s->a_pexpr, expr = s->a_expr, var_names,
|
||||||
NULL, NULL, fun2_names, fun2, 0, ctx)) < 0)
|
NULL, NULL, fun2_names, fun2, 0, ctx)) < 0) {
|
||||||
|
av_log(ctx, AV_LOG_ERROR, "Failed to parse expression: %s \n", expr);
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue