[vlc-devel] [PATCH 02/39] video_output: set the pose outside of VoutGetDisplayCfg

Steve Lhomme robux4 at ycbcr.xyz
Wed Oct 2 16:23:17 CEST 2019


Avoid passing the video format just for that.
---
 src/video_output/video_output.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 4b11d4c6de4..e0d7dcc317b 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -631,11 +631,9 @@ void vout_ChangeViewpoint(vout_thread_t *vout,
 }
 
 /* */
-static void VoutGetDisplayCfg(vout_thread_t *vout, const video_format_t *fmt, vout_display_cfg_t *cfg)
+static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg)
 {
     /* Load configuration */
-    cfg->viewpoint = fmt->pose;
-
     const int display_width = var_GetInteger(vout, "width");
     const int display_height = var_GetInteger(vout, "height");
     cfg->display.width   = display_width > 0  ? display_width  : 0;
@@ -1955,7 +1953,8 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input)
 #endif
         };
 
-        VoutGetDisplayCfg(vout, &original, &sys->display_cfg);
+        VoutGetDisplayCfg(vout, &sys->display_cfg);
+        sys->display_cfg.viewpoint = sys->original.pose;
         vout_SizeWindow(vout, &sys->original, &wcfg.width, &wcfg.height);
 
         if (vout_window_Enable(sys->display_cfg.window, &wcfg)) {
-- 
2.17.1



More information about the vlc-devel mailing list