[FFmpeg-devel] [PATCH] lavfi/drawtext: add alias "expr_int_format" to expansion function "eif"
Michael Niedermayer
michaelni at gmx.at
Fri Jul 18 14:23:54 CEST 2014
On Fri, Jul 18, 2014 at 07:53:48AM +0200, Stefano Sabatini wrote:
> On date Friday 2014-07-18 01:00:40 +0300, Andrey Utkin encoded:
> > ---
> > doc/filters.texi | 2 +-
> > libavfilter/vf_drawtext.c | 3 ++-
> > 2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/doc/filters.texi b/doc/filters.texi
> > index 8cde277..a7919a3 100644
> > --- a/doc/filters.texi
> > +++ b/doc/filters.texi
> > @@ -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
> > value.
> >
> > - at item eif
> > + at item expr_int_format, eif
> > Evaluate the expression's value and output as formatted integer.
> >
> > First argument is expression to be evaluated, same as for @var{expr} function.
> > diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> > index c744d93..b7a295f 100644
> > --- a/libavfilter/vf_drawtext.c
> > +++ b/libavfilter/vf_drawtext.c
> > @@ -949,7 +949,7 @@ static int func_eval_expr_int_format(AVFilterContext *ctx, AVBPrint *bp,
> > if (argc == 3) {
> > ret = sscanf(argv[2], "%u", &positions);
> > 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]);
> > return AVERROR(EINVAL);
> > }
> > @@ -982,6 +982,7 @@ static const struct drawtext_function {
> > } functions[] = {
> > { "expr", 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 },
> > { "pict_type", 0, 0, 0, func_pict_type },
> > { "pts", 0, 2, 0, func_pts },
>
> LGTM.
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Old school: Use the lowest level language in which you can solve the problem
conveniently.
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140718/bbb9e028/attachment.asc>
More information about the ffmpeg-devel
mailing list