[vlc-devel] [PATCH v2 2/7] video_output: don't apply the source aspect ratio as a cropping ratio
Steve Lhomme
robux4 at ycbcr.xyz
Tue Sep 1 16:18:59 CEST 2020
The value read for VOUT_CROP_RATIO should be applied to vout_SetDisplayCrop()
not the source aspect ratio.
vout_SetDisplayAspect() always used "source.dar".
Regression introduced in 4563df98a188f4276d2529484d1b3f3dafb9182b.
---
src/video_output/video_output.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 30b2daa7380..1676641706a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1725,6 +1725,7 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
vout_display_cfg_t dcfg;
int x = 0, y = 0, w = 0, h = 0;
+ unsigned crop_num = 0, crop_den = 0;
unsigned num, den;
vlc_mutex_lock(&sys->window_lock);
@@ -1744,8 +1745,8 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
case VOUT_CROP_NONE:
break;
case VOUT_CROP_RATIO:
- num = sys->source.crop.ratio.num;
- den = sys->source.crop.ratio.den;
+ crop_num = sys->source.crop.ratio.num;
+ crop_den = sys->source.crop.ratio.den;
break;
case VOUT_CROP_WINDOW:
x = sys->source.crop.window.x;
@@ -1777,7 +1778,7 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
goto error;
}
- vout_SetDisplayCrop(sys->display, num, den, x, y, w, h);
+ vout_SetDisplayCrop(sys->display, crop_num, crop_den, x, y, w, h);
if (num != 0 && den != 0)
vout_SetDisplayAspect(sys->display, num, den);
--
2.26.2
More information about the vlc-devel
mailing list