[vlc-commits] opengl: remove intermediate local variable

Romain Vimont git at videolan.org
Wed May 20 14:55:40 CEST 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Tue Mar 10 17:21:38 2020 +0100| [2163672ddf96e777a715f2027923a32b7e82a346] | committer: Alexandre Janniaux

opengl: remove intermediate local variable

The projection mode can be read from the provided video format. The
intermediate renderer variable is unnecessary.

Signed-off-by: Alexandre Janniaux <ajanni at videolabs.io>

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

 modules/video_output/opengl/vout_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 31b828d64a..fa649c3b94 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -143,7 +143,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
         return NULL;
     }
 
-    struct vlc_gl_renderer *renderer = vgl->renderer =
+    vgl->renderer =
         vlc_gl_renderer_New(gl, &vgl->api, vgl->interop, fmt, b_dump_shaders);
     if (!vgl->renderer)
     {
@@ -180,7 +180,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
 
     GL_ASSERT_NOERROR(vt);
 
-    if (renderer->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR
+    if (fmt->projection_mode != PROJECTION_MODE_RECTANGULAR
      && vout_display_opengl_SetViewpoint(vgl, viewpoint) != VLC_SUCCESS)
     {
         vout_display_opengl_Delete(vgl);



More information about the vlc-commits mailing list