[vlc-devel] [PATCH 1/2] win32: sensors: do not sent a temporary address

Steve Lhomme robux4 at ycbcr.xyz
Wed Jul 17 10:57:09 CEST 2019


It's not converted to a value but used as an address.
---
 modules/video_output/win32/sensors.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/win32/sensors.cpp b/modules/video_output/win32/sensors.cpp
index 17727afaad..f256cf3e7f 100644
--- a/modules/video_output/win32/sensors.cpp
+++ b/modules/video_output/win32/sensors.cpp
@@ -123,13 +123,13 @@ public:
             PropVariantClear(&pvRot);
         }
 
-        vlc_viewpoint_t vp = {
+        sent_pos = {
             old_pos.yaw   - current_pos.yaw,
             old_pos.pitch - current_pos.pitch,
             old_pos.roll  - current_pos.roll,
             0.0f
         };
-        vout_display_SendEventViewpointMoved(vd, &vp);
+        vout_display_SendEventViewpointMoved(vd, &sent_pos);
         return S_OK;
     }
 
@@ -150,6 +150,7 @@ public:
 private:
     vout_display_t *const vd;
     vlc_viewpoint_t current_pos;
+    vlc_viewpoint_t sent_pos;
     long m_cRef;
 };
 
-- 
2.17.1



More information about the vlc-devel mailing list