diff mbox

[FFmpeg-devel] avfilter/vf_overlay: add comment into eval_expr

Message ID 20180109024144.22709-1-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Liu Steven Jan. 9, 2018, 2:41 a.m. UTC
comment about the looks like a duplicate line.
but that is used to reason x is expressed from y

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavfilter/vf_overlay.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Niedermayer Jan. 9, 2018, 6:36 p.m. UTC | #1
On Tue, Jan 09, 2018 at 10:41:44AM +0800, Steven Liu wrote:
> comment about the looks like a duplicate line.
> but that is used to reason x is expressed from y
> 
> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
> ---
>  libavfilter/vf_overlay.c | 1 +
>  1 file changed, 1 insertion(+)

LGTM, btw there were also other filters which do this


[...]
diff mbox

Patch

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index aa5835ae3a..c6a6ac82f3 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -149,6 +149,7 @@  static void eval_expr(AVFilterContext *ctx)
 
     s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);
     s->var_values[VAR_Y] = av_expr_eval(s->y_pexpr, s->var_values, NULL);
+    /* It is necessary if x is expressed from y  */
     s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);
     s->x = normalize_xy(s->var_values[VAR_X], s->hsub);
     s->y = normalize_xy(s->var_values[VAR_Y], s->vsub);