[vlc-devel] [PATCH 2/7] video_output: don't apply the source aspect ratio as a cropping ratio

Steve Lhomme robux4 at ycbcr.xyz
Tue Sep 1 12:06:33 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 49a1e9653ad..5149059d2b4 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1760,8 +1760,6 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
             break;
     }
 
-    num = sys->source.dar.num;
-    den = sys->source.dar.den;
     vlc_mutex_lock(&sys->display_lock);
     vlc_mutex_unlock(&sys->window_lock);
 
@@ -1778,6 +1776,8 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo
 
     vout_SetDisplayCrop(sys->display, num, den, x, y, w, h);
 
+    num = sys->source.dar.num;
+    den = sys->source.dar.den;
     if (num != 0 && den != 0)
         vout_SetDisplayAspect(sys->display, num, den);
     vlc_mutex_unlock(&sys->display_lock);
-- 
2.26.2



More information about the vlc-devel mailing list