1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avfilter/vf_libplacebo: don't override existing rotation attribute

This is a regression introduced by the addition of the rotation option,
which overrode the existing rotation attribute that may have been set to
the image.

To fix it, add the rotation istead of setting it - however we have to do this
directly when mapping, so as to not add it multiple times.

Fixes: 4f623b4c59
This commit is contained in:
Niklas Haas
2025-11-03 18:18:33 +01:00
committed by Niklas Haas
parent 6c1acbbffb
commit 49452967e7

View File

@@ -912,7 +912,6 @@ static void update_crops(AVFilterContext *ctx, LibplaceboInput *in,
image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL);
image->crop.x1 = image->crop.x0 + s->var_values[VAR_CROP_W];
image->crop.y1 = image->crop.y0 + s->var_values[VAR_CROP_H];
image->rotation = s->rotation;
if (s->rotation % PL_ROTATION_180 == PL_ROTATION_90) {
/* Libplacebo expects the input crop relative to the actual frame
* dimensions, so un-transpose them here */
@@ -1150,6 +1149,7 @@ static bool map_frame(pl_gpu gpu, pl_tex *tex,
));
out->lut = s->lut;
out->lut_type = s->lut_type;
out->rotation += s->rotation;
if (!s->apply_filmgrain)
out->film_grain.type = PL_FILM_GRAIN_NONE;