From a2b25359ad5adfaa63639110e5cebe4c0f55dee5 Mon Sep 17 00:00:00 2001 From: Romain Vimont <rom1v@videolabs.io> Date: Tue, 31 Aug 2021 15:52:59 +0200 Subject: [PATCH] opengl: fix filter PRIV() The macro parameter name was the same as the member name ("filter"). To avoid the problem, use a static inline function instead. --- modules/video_output/opengl/filter_priv.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/video_output/opengl/filter_priv.h b/modules/video_output/opengl/filter_priv.h index e28bd99b6164..8f6c8ddedc4e 100644 --- a/modules/video_output/opengl/filter_priv.h +++ b/modules/video_output/opengl/filter_priv.h @@ -68,8 +68,11 @@ struct vlc_gl_filter_priv { struct vlc_list blend_subfilters; /**< list of vlc_gl_filter_priv.node */ }; -#define vlc_gl_filter_PRIV(filter) \ - container_of(filter, struct vlc_gl_filter_priv, filter) +static inline struct vlc_gl_filter_priv * +vlc_gl_filter_PRIV(struct vlc_gl_filter *filter) +{ + return container_of(filter, struct vlc_gl_filter_priv, filter); +} struct vlc_gl_filter * vlc_gl_filter_New(vlc_object_t *parent, const struct vlc_gl_api *api); -- GitLab