Commit 0a9fffb9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

p_memcpy_module is private libvlc data

parent 9df28485
......@@ -66,8 +66,6 @@ struct libvlc_int_t
int i_verbose; ///< info messages
bool b_color; ///< color messages?
module_t * p_memcpy_module; ///< Fast memcpy plugin used
/* Structure storing the action name / key associations */
struct hotkey
{
......
......@@ -708,7 +708,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/*
* Choose the best memcpy module
*/
p_libvlc->p_memcpy_module = module_Need( p_libvlc, "memcpy", "$memcpy", 0 );
priv->p_memcpy_module = module_Need( p_libvlc, "memcpy", "$memcpy", 0 );
priv->b_stats = config_GetInt( p_libvlc, "stats" ) > 0;
priv->i_timers = 0;
......@@ -747,9 +747,9 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
if( !p_libvlc->p_playlist )
{
msg_Err( p_libvlc, "playlist initialization failed" );
if( p_libvlc->p_memcpy_module != NULL )
if( priv->p_memcpy_module != NULL )
{
module_Unneed( p_libvlc, p_libvlc->p_memcpy_module );
module_Unneed( p_libvlc, priv->p_memcpy_module );
}
module_EndBank( p_libvlc );
return VLC_EGENERIC;
......@@ -1056,10 +1056,10 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
}
#endif
if( p_libvlc->p_memcpy_module )
if( priv->p_memcpy_module )
{
module_Unneed( p_libvlc, p_libvlc->p_memcpy_module );
p_libvlc->p_memcpy_module = NULL;
module_Unneed( p_libvlc, priv->p_memcpy_module );
priv->p_memcpy_module = NULL;
}
/* Free module bank. It is refcounted, so we call this each time */
......
......@@ -176,6 +176,8 @@ typedef struct libvlc_priv_t
counter_t **pp_timers; ///< Array of all timers
int i_timers; ///< Number of timers
bool b_stats; ///< Whether to collect stats
module_t *p_memcpy_module; ///< Fast memcpy plugin used
} libvlc_priv_t;
static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment