[vlc-devel] [PATCH 4/7] display: don't overwrite user crop values in vout_UpdateSourceCrop
Steve Lhomme
robux4 at ycbcr.xyz
Fri Nov 13 16:56:31 CET 2020
It's actually setting the same values it read from the same fields.
These values only change in vout_SetDisplayCrop() which is not called here
(rather vout_SetDisplayCrop calls vout_UpdateSourceCrop).
---
src/video_output/display.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 719def43bdb..f010188f66f 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -471,13 +471,11 @@ static int vout_UpdateSourceCrop(vout_display_t *vd)
{
vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
video_format_t fmt = osys->source;
- unsigned crop_num = osys->crop.num;
- unsigned crop_den = osys->crop.den;
- if (crop_num != 0 && crop_den != 0) {
+ if (osys->crop.num != 0 && osys->crop.den != 0) {
VoutDisplayCropRatio(&osys->crop.left, &osys->crop.top,
&osys->crop.right, &osys->crop.bottom,
- &osys->source, crop_num, crop_den);
+ &osys->source, osys->crop.num, osys->crop.den);
}
const int right_max = osys->source.i_x_offset
@@ -517,8 +515,6 @@ static int vout_UpdateSourceCrop(vout_display_t *vd)
(osys->source.i_x_offset + osys->source.i_visible_width);
osys->crop.bottom = bottom -
(osys->source.i_y_offset + osys->source.i_visible_height);
- osys->crop.num = crop_num;
- osys->crop.den = crop_den;
return ret;
}
--
2.26.2
More information about the vlc-devel
mailing list