vlc | branch: master | Adrien Maglo <mags...@videolan.org> | Wed Nov 23 
20:04:44 2016 +0100| [c18c70f554c70e4c6865ad7a77ade841b409f81b] | committer: 
Thomas Guillem

input: clip the viewpoint FOV with min and max constants

Signed-off-by: Thomas Guillem <tho...@gllm.fr>

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

 src/input/input.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index cfcb92f..aebeea2 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1948,7 +1948,9 @@ static bool Control( input_thread_t *p_input,
             priv->viewpoint.yaw = fmodf( priv->viewpoint.yaw, 360.f );
             priv->viewpoint.pitch = fmodf( priv->viewpoint.pitch, 360.f );
             priv->viewpoint.roll = fmodf( priv->viewpoint.roll, 360.f );
-            priv->viewpoint.fov = VLC_CLIP( priv->viewpoint.fov, 0.f, 180.f );
+            priv->viewpoint.fov = VLC_CLIP( priv->viewpoint.fov,
+                                            FIELD_OF_VIEW_DEGREES_MIN,
+                                            FIELD_OF_VIEW_DEGREES_MAX );
             priv->viewpoint.zoom = VLC_CLIP( priv->viewpoint.zoom, -1.f, 1.f );
 
             vout_thread_t **pp_vout;

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to