aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-06-20 16:36:08 +0200
committerNiklas Haas <git@haasn.dev>2023-06-20 17:09:58 +0200
commite998d0a4f7cce78d36a7d4ebdc11aa4e39f5b440 (patch)
tree7b2795a889d82df9b8b82d15ae35859f6f30db85
parentf998a618bac1f61586a3625620e0794c1abba04c (diff)
downloadffmpeg-e998d0a4f7cce78d36a7d4ebdc11aa4e39f5b440.tar.gz
lavfi/vf_libplacebo: allow pos_w to depend on pos_h
Ditto for crop_w/crop_h. Requires simply repeating the evaluation of the first variable to be evaluated.
-rw-r--r--libavfilter/vf_libplacebo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 056041d213..0f7c648192 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -775,10 +775,14 @@ static void update_crops(AVFilterContext *ctx, LibplaceboInput *in,
av_expr_eval(s->crop_w_pexpr, s->var_values, NULL);
s->var_values[VAR_CROP_H] = s->var_values[VAR_CH] =
av_expr_eval(s->crop_h_pexpr, s->var_values, NULL);
+ s->var_values[VAR_CROP_W] = s->var_values[VAR_CW] =
+ av_expr_eval(s->crop_w_pexpr, s->var_values, NULL);
s->var_values[VAR_POS_W] = s->var_values[VAR_PW] =
av_expr_eval(s->pos_w_pexpr, s->var_values, NULL);
s->var_values[VAR_POS_H] = s->var_values[VAR_PH] =
av_expr_eval(s->pos_h_pexpr, s->var_values, NULL);
+ s->var_values[VAR_POS_W] = s->var_values[VAR_PW] =
+ av_expr_eval(s->pos_w_pexpr, s->var_values, NULL);
image->crop.x0 = av_expr_eval(s->crop_x_pexpr, s->var_values, NULL);
image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL);