[vlc-commits] video_output: don't apply the source aspect ratio as a cropping ratio
Steve Lhomme
git at videolan.org
Thu Sep 3 07:47:37 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep 1 11:35:04 2020 +0200| [583ad63665efbf3e91b858797c9e1c7fe35b7b12] | committer: Steve Lhomme
video_output: don't apply the source aspect ratio as a cropping ratio
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=583ad63665efbf3e91b858797c9e1c7fe35b7b12
---
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 30b2daa738..1676641706 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);
More information about the vlc-commits
mailing list