[vlc-devel] [PATCH 4/8] video_output: use the vout_display_cfg_t in use by the display when possible

Steve Lhomme robux4 at ycbcr.xyz
Mon May 13 13:54:49 CEST 2019


During initialization SizeWindow returns the size based on the initial sizes
forced by the user (or the visible source dimensions). But once the display is
created the width/height of the display is known/updated in the local config.

Same thing for the zoom which is used in vout_display_SizeWindow().
---
 src/video_output/video_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6e8c8608eb..8605ac2e0b 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -196,7 +196,7 @@ static void vout_SizeWindow(vout_thread_t *vout, unsigned *restrict width,
     /* If the vout thread is running, the window lock must be held here. */
     vout_display_SizeWindow(width, height, w, h, sar_num, sar_den,
                             sys->original.orientation,
-                            &sys->display_cfg);
+                            sys->display != NULL ? sys->display->cfg : &sys->display_cfg);
 }
 
 static void vout_UpdateWindowSize(vout_thread_t *vout)
-- 
2.17.1



More information about the vlc-devel mailing list