[vlc-commits] opengl: fix the projection aspect ratio

Steve Lhomme git at videolan.org
Mon Oct 10 23:50:36 CEST 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Sep 20 10:04:44 2016 +0200| [86f8b402304274694d7ba8f857e54ef924818b4b] | committer: Jean-Baptiste Kempf

opengl: fix the projection aspect ratio

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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);



More information about the vlc-commits mailing list