[vlc-devel] [PATCH] opengl: fix the projection aspect ratio

Steve Lhomme robux4 at videolabs.io
Tue Sep 20 10:04:44 CEST 2016


---
 modules/video_output/opengl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 6017fdc..3369281 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -1532,7 +1532,7 @@ static void DrawWithShaders(vout_display_opengl_t *vgl,
     if (vgl->fmt.projection_mode == PROJECTION_MODE_EQUIRECTANGULAR
         || vgl->fmt.projection_mode == PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD)
     {
-        float sar = vgl->fmt.i_visible_width / vgl->fmt.i_visible_height;
+        float sar = (float) vgl->fmt.i_visible_width / vgl->fmt.i_visible_height;
         getProjectionMatrix(sar, projectionMatrix);
         getViewMatrix(viewMatrix);
         getYRotMatrix(vgl->f_teta, yRotMatrix);
-- 
2.8.2



More information about the vlc-devel mailing list