[vlc-commits] opengl: remove a cast to vlc_object_t*

Steve Lhomme git at videolan.org
Thu Apr 4 12:30:58 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr  4 11:54:31 2019 +0200| [48c7b2b22062a9b3b05c02d179987fb014dc6523] | committer: Steve Lhomme

opengl: remove a cast to vlc_object_t*

It's better to use the macro that find found if/when the vout_window_t is not
a vlc_object_t.

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

 src/video_output/opengl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index 93527beea7..f17c8ff05c 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -64,7 +64,6 @@ vlc_gl_t *vlc_gl_Create(const struct vout_display_cfg *restrict cfg,
                         unsigned flags, const char *name)
 {
     vout_window_t *wnd = cfg->window;
-    vlc_object_t *parent = (vlc_object_t *)wnd;
     struct vlc_gl_priv_t *glpriv;
     const char *type;
 
@@ -80,7 +79,7 @@ vlc_gl_t *vlc_gl_Create(const struct vout_display_cfg *restrict cfg,
             return NULL;
     }
 
-    glpriv = vlc_custom_create(parent, sizeof (*glpriv), "gl");
+    glpriv = vlc_custom_create(VLC_OBJECT(wnd), sizeof (*glpriv), "gl");
     if (unlikely(glpriv == NULL))
         return NULL;
 



More information about the vlc-commits mailing list