[vlc-devel] commit: Fix libvlc private data alignment (untested) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Aug 13 21:42:11 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Aug 13 22:43:50 2008 +0300| [33112b7797ba051e389d5c91a4a2e807d0e2c55c] | committer: Rémi Denis-Courmont
Fix libvlc private data alignment (untested)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=33112b7797ba051e389d5c91a4a2e807d0e2c55c
---
src/libvlc.c | 3 +--
src/libvlc.h | 4 +++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 8c1f907..9673a5c 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -195,8 +195,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
}
/* Allocate a libvlc instance object */
- p_libvlc = vlc_custom_create( VLC_OBJECT(p_libvlc_global),
- sizeof (*p_libvlc) + sizeof (libvlc_priv_t),
+ p_libvlc = vlc_custom_create( VLC_OBJECT(p_libvlc_global), sizeof (*priv),
VLC_OBJECT_LIBVLC, "libvlc" );
if( p_libvlc != NULL )
i_instances++;
diff --git a/src/libvlc.h b/src/libvlc.h
index 94e2a69..e9ec933 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -222,6 +222,8 @@ vlc_object_signal_maybe (vlc_object_t *p_this)
*/
typedef struct libvlc_priv_t
{
+ libvlc_int_t public_data;
+
/* Configuration */
vlc_mutex_t config_lock; ///< config file lock
char * psz_configfile; ///< location of config file
@@ -263,7 +265,7 @@ typedef struct libvlc_priv_t
static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)
{
- return (libvlc_priv_t *)(libvlc + 1);
+ return (libvlc_priv_t *)libvlc;
}
void playlist_ServicesDiscoveryKillAll( playlist_t *p_playlist );
More information about the vlc-devel
mailing list