Commit cb8cb85d authored by Andrey Utkin's avatar Andrey Utkin Committed by Michael Niedermayer

lavfi/drawtext: add alias "expr_int_format" to expansion function "eif"

Reviewed-by: 's avatarStefano Sabatini <stefasab@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 00357834
...@@ -3916,7 +3916,7 @@ example the text size is not known when evaluating the expression, so ...@@ -3916,7 +3916,7 @@ example the text size is not known when evaluating the expression, so
the constants @var{text_w} and @var{text_h} will have an undefined the constants @var{text_w} and @var{text_h} will have an undefined
value. value.
@item eif @item expr_int_format, eif
Evaluate the expression's value and output as formatted integer. Evaluate the expression's value and output as formatted integer.
First argument is expression to be evaluated, same as for @var{expr} function. First argument is expression to be evaluated, same as for @var{expr} function.
......
...@@ -949,7 +949,7 @@ static int func_eval_expr_int_format(AVFilterContext *ctx, AVBPrint *bp, ...@@ -949,7 +949,7 @@ static int func_eval_expr_int_format(AVFilterContext *ctx, AVBPrint *bp,
if (argc == 3) { if (argc == 3) {
ret = sscanf(argv[2], "%u", &positions); ret = sscanf(argv[2], "%u", &positions);
if (ret != 1) { if (ret != 1) {
av_log(ctx, AV_LOG_ERROR, "eif(): Invalid number of positions" av_log(ctx, AV_LOG_ERROR, "expr_int_format(): Invalid number of positions"
" to print: '%s'\n", argv[2]); " to print: '%s'\n", argv[2]);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
...@@ -982,6 +982,7 @@ static const struct drawtext_function { ...@@ -982,6 +982,7 @@ static const struct drawtext_function {
} functions[] = { } functions[] = {
{ "expr", 1, 1, 0, func_eval_expr }, { "expr", 1, 1, 0, func_eval_expr },
{ "e", 1, 1, 0, func_eval_expr }, { "e", 1, 1, 0, func_eval_expr },
{ "expr_int_format", 2, 3, 0, func_eval_expr_int_format },
{ "eif", 2, 3, 0, func_eval_expr_int_format }, { "eif", 2, 3, 0, func_eval_expr_int_format },
{ "pict_type", 0, 0, 0, func_pict_type }, { "pict_type", 0, 0, 0, func_pict_type },
{ "pts", 0, 2, 0, func_pts }, { "pts", 0, 2, 0, func_pts },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment