[vlc-devel] [PATCH 5/8] vout: an empty viewpoint means reset

Steve Lhomme robux4 at videolabs.io
Tue Sep 13 13:43:35 CEST 2016


--
replaces https://patches.videolan.org/patch/14422/ fixing the logic
---
 src/video_output/vout_intf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index b265ea6..0842770 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -628,6 +628,8 @@ static int ViewpointCallback(vlc_object_t *obj, char const *cmd,
     float f_yaw, f_pitch, f_roll;
     if (sscanf(newval.psz_string, "%f:%f:%f", &f_yaw, &f_pitch, &f_roll) == 3) {
         vout_ControlChangeViewpoint((vout_thread_t *)obj, f_yaw, f_pitch, f_roll);
+    } else if (!newval.psz_string || !newval.psz_string[0]) {
+        vout_ControlChangeViewpoint((vout_thread_t *)obj, 0.0, 0.0, 0.0);
     } else {
         msg_Err(obj, "Unknown viewpoint format (%s)", newval.psz_string);
     }
-- 
2.7.2.windows.1



More information about the vlc-devel mailing list