[FFmpeg-devel] avfilter/vf_overlay: remove duplicate parse line

Submitted by Steven Liu on Jan. 8, 2018, 8:16 a.m.

Details

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

Commit Message

Steven Liu Jan. 8, 2018, 8:16 a.m.
duplicate av_expr_eval x_pexpr, remove the second one.

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

Comments

Nicolas George Jan. 8, 2018, 12:27 p.m.
Steven Liu (2018-01-08):
> duplicate av_expr_eval x_pexpr, remove the second one.

No. It is necessary if x is expressed from y.

Regards,
Paul B Mahol Jan. 8, 2018, 12:57 p.m.
On 1/8/18, Nicolas George <george@nsup.org> wrote:
> Steven Liu (2018-01-08):
>> duplicate av_expr_eval x_pexpr, remove the second one.
>
> No. It is necessary if x is expressed from y.
>
> Regards,

Comment should be added so such patches do not pop again.

Patch hide | download patch | download mbox

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index aa5835ae3a..240f6f3803 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -149,7 +149,6 @@  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);
-    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);
 }