[vlc-commits] opengl: refactor, use intermediate variable

Thomas Guillem git at videolan.org
Wed May 23 12:45:10 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed May 23 08:50:36 2018 +0200| [f28f6b32f7e121747835c853ed4894376b99da98] | committer: Thomas Guillem

opengl: refactor, use intermediate variable

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

 src/video_output/opengl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index f5f19085d2..481df220cb 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -70,11 +70,12 @@ vlc_gl_t *vlc_gl_Create(struct vout_window_t *wnd, unsigned flags,
     if (unlikely(glpriv == NULL))
         return NULL;
 
-    glpriv->gl.surface = wnd;
-    glpriv->gl.module = module_need(&glpriv->gl, type, name, true);
-    if (glpriv->gl.module == NULL)
+    vlc_gl_t *gl = &glpriv->gl;
+    gl->surface = wnd;
+    gl->module = module_need(gl, type, name, true);
+    if (gl->module == NULL)
     {
-        vlc_object_release(&glpriv->gl);
+        vlc_object_release(gl);
         return NULL;
     }
     atomic_init(&glpriv->ref_count, 1);



More information about the vlc-commits mailing list