Ditto for crop_w/crop_h. Requires simply repeating the evaluation of the first variable to be evaluated.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -775,10 +775,14 @@ static void update_crops(AVFilterContext *ctx, LibplaceboInput *in, · 774 unmodified lines | |||
| 775 | av_expr_eval(s->crop_w_pexpr, s->var_values, NULL); | 775 | av_expr_eval(s->crop_w_pexpr, s->var_values, NULL); |
| 776 | s->var_values[VAR_CROP_H] = s->var_values[VAR_CH] = | 776 | s->var_values[VAR_CROP_H] = s->var_values[VAR_CH] = |
| 777 | av_expr_eval(s->crop_h_pexpr, s->var_values, NULL); | 777 | av_expr_eval(s->crop_h_pexpr, s->var_values, NULL); |
| 778 | s->var_values[VAR_CROP_W] = s->var_values[VAR_CW] = | ||
| 779 | av_expr_eval(s->crop_w_pexpr, s->var_values, NULL); | ||
| 778 | s->var_values[VAR_POS_W] = s->var_values[VAR_PW] = | 780 | s->var_values[VAR_POS_W] = s->var_values[VAR_PW] = |
| 779 | av_expr_eval(s->pos_w_pexpr, s->var_values, NULL); | 781 | av_expr_eval(s->pos_w_pexpr, s->var_values, NULL); |
| 780 | s->var_values[VAR_POS_H] = s->var_values[VAR_PH] = | 782 | s->var_values[VAR_POS_H] = s->var_values[VAR_PH] = |
| 781 | av_expr_eval(s->pos_h_pexpr, s->var_values, NULL); | 783 | av_expr_eval(s->pos_h_pexpr, s->var_values, NULL); |
| 784 | s->var_values[VAR_POS_W] = s->var_values[VAR_PW] = | ||
| 785 | av_expr_eval(s->pos_w_pexpr, s->var_values, NULL); | ||
| 782 | 786 | ||
| 783 | image->crop.x0 = av_expr_eval(s->crop_x_pexpr, s->var_values, NULL); | 787 | image->crop.x0 = av_expr_eval(s->crop_x_pexpr, s->var_values, NULL); |
| 784 | image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL); | 788 | image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL); |