Skip to content

Commit

Permalink
fix movit.rect distort property not working
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Dec 21, 2023
1 parent 3ffb57b commit 30a1280
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/modules/movit/filter_movit_rect.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* filter_movit_rect.cpp
* Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
* Copyright (C) 2013-2023 Dan Dennedy <dan@dennedy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -32,7 +32,7 @@ static mlt_frame process(mlt_filter filter, mlt_frame frame)
auto rect = mlt_properties_anim_get_rect(properties, "rect", position, length);
mlt_properties_set_rect(frame_props, "resize.rect", rect);
mlt_properties_set(frame_props, "resize.fill", mlt_properties_get(properties, "fill"));
mlt_properties_set(frame_props, "distort", mlt_properties_get(properties, "distort"));
mlt_properties_set(frame_props, "resize.distort", mlt_properties_get(properties, "distort"));
mlt_properties_set(frame_props, "resize.halign", mlt_properties_get(properties, "halign"));
mlt_properties_set(frame_props, "resize.valign", mlt_properties_get(properties, "valign"));
return frame;
Expand Down
6 changes: 3 additions & 3 deletions src/modules/movit/filter_movit_resize.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* filter_movit_resize.cpp
* Copyright (C) 2013-2020 Dan Dennedy <dan@dennedy.org>
* Copyright (C) 2013-2023 Dan Dennedy <dan@dennedy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -115,7 +115,7 @@ static int get_image(mlt_frame frame,
if (*format == mlt_image_none || (rescale && !strcmp(rescale, "none")))
return mlt_frame_get_image(frame, image, format, width, height, writable);

if (mlt_properties_get_int(properties, "distort") == 0) {
if (mlt_properties_get_int(properties, "resize.distort") == 0) {
// Normalize the input and out display aspect
int normalized_width = profile->width;
int normalized_height = profile->height;
Expand Down Expand Up @@ -158,7 +158,7 @@ static int get_image(mlt_frame frame,
mlt_frame_set_aspect_ratio(frame, consumer_aspect);
}

mlt_properties_set_int(properties, "distort", 0);
mlt_properties_set_int(properties, "resize.distort", 0);

// Now get the image
*format = mlt_image_movit;
Expand Down

0 comments on commit 30a1280

Please sign in to comment.