[vlc-commits] video_output: fix viewpoint initialization from input

Thomas Guillem git at videolan.org
Thu Nov 17 09:37:09 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Nov 17 09:22:54 2016 +0100| [a892f9aa7660499bec487cd1f537181b5cffc2d8] | committer: Thomas Guillem

video_output: fix viewpoint initialization from input

Partially revert commits 8a62e7a2e14d8715e9783c895661a3901a2b96bf
and 2d32661b145718b2d31dbf9a2f23b7f7af39799c

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a892f9aa7660499bec487cd1f537181b5cffc2d8
---

 src/video_output/video_output.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6c937c0..fde5947 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -559,8 +559,13 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
     if (p_viewpoint != NULL)
         cfg->viewpoint = *p_viewpoint;
     else
-        vlc_viewpoint_init( &cfg->viewpoint );
-
+    {
+        cfg->viewpoint.yaw = vout->p->original.f_pose_yaw_degrees;
+        cfg->viewpoint.pitch = vout->p->original.f_pose_pitch_degrees;
+        cfg->viewpoint.roll = vout->p->original.f_pose_roll_degrees;
+        cfg->viewpoint.fov = vout->p->original.f_pose_fov_degrees;
+        cfg->viewpoint.zoom = 0.f;
+    }
     cfg->display.title = title;
     const int display_width = var_CreateGetInteger(vout, "width");
     const int display_height = var_CreateGetInteger(vout, "height");
@@ -1471,16 +1476,6 @@ static int ThreadReinit(vout_thread_t *vout,
         state.cfg.zoom.den = 1;
     }
 
-    if (original.projection_mode == PROJECTION_MODE_EQUIRECTANGULAR
-        || original.projection_mode == PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD)
-    {
-        state.cfg.viewpoint.yaw = original.f_pose_yaw_degrees;
-        state.cfg.viewpoint.pitch = original.f_pose_pitch_degrees;
-        state.cfg.viewpoint.roll = original.f_pose_roll_degrees;
-        state.cfg.viewpoint.fov = original.f_pose_fov_degrees;
-        state.cfg.viewpoint.zoom = 0.f;
-    }
-
     vout->p->original = original;
     vout->p->dpb_size = cfg->dpb_size;
     if (ThreadStart(vout, &state)) {



More information about the vlc-commits mailing list