Fix libvlc private data alignment (untested)

This commit is contained in:
Rémi Denis-Courmont 2008-08-13 22:43:50 +03:00
parent 95b8d81643
commit 33112b7797
2 changed files with 4 additions and 3 deletions

View File

@ -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++;

View File

@ -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 );