You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avfilter/vf_libplacebo: make rotation check more robust
This currently does not make any difference, but it makes the check more robust against possible future changes to the rotation parameter.
This commit is contained in:
@@ -912,7 +912,9 @@ 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];
|
||||
if (s->rotation % PL_ROTATION_180 == PL_ROTATION_90) {
|
||||
|
||||
const pl_rotation rot_total = image->rotation - target->rotation;
|
||||
if ((rot_total + PL_ROTATION_360) % PL_ROTATION_180 == PL_ROTATION_90) {
|
||||
/* Libplacebo expects the input crop relative to the actual frame
|
||||
* dimensions, so un-transpose them here */
|
||||
FFSWAP(float, image->crop.x0, image->crop.y0);
|
||||
|
||||
Reference in New Issue
Block a user