[vlc-devel] [PATCH] opengl: remove a cast to vlc_object_t*
Steve Lhomme
robux4 at ycbcr.xyz
Thu Apr 4 11:54:42 CEST 2019
It's better to use the macro that find found if/when the vout_window_t is not
a vlc_object_t.
---
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;
--
2.17.1
More information about the vlc-devel
mailing list