[vlc-commits] [Git][videolan/vlc][master] vlc_objects: don't cast to vlc_object_t unless it's a valid cast
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Oct 20 12:53:32 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
5b7f2d0e by Steve Lhomme at 2023-10-20T11:58:09+00:00
vlc_objects: don't cast to vlc_object_t unless it's a valid cast
We don't need multiple level of indirections.
- - - - -
2 changed files:
- include/vlc_objects.h
- src/video_output/video_output.c
Changes:
=====================================
include/vlc_objects.h
=====================================
@@ -81,7 +81,7 @@ struct vlc_object_t
# define VLC_OBJECT(x) \
_Generic((x)->obj, \
struct vlc_object_marker *: (x), \
- default: (&((x)->obj)) \
+ struct vlc_object_t: (&((x)->obj)) \
)
#else
static inline vlc_object_t *VLC_OBJECT(vlc_object_t *o)
=====================================
src/video_output/video_output.c
=====================================
@@ -721,7 +721,7 @@ static int FilterRestartCallback(vlc_object_t *p_this, char const *psz_var,
static int DelFilterCallbacks(filter_t *filter, void *opaque)
{
vout_thread_sys_t *sys = opaque;
- filter_DelProxyCallbacks(VLC_OBJECT(sys), filter,
+ filter_DelProxyCallbacks(VLC_OBJECT(&sys->obj), filter,
FilterRestartCallback);
return VLC_SUCCESS;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5b7f2d0ea5de74cdf3fa9c6e8a93b64321948f54
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5b7f2d0ea5de74cdf3fa9c6e8a93b64321948f54
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list