Commit 01a00901 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Alpha mask: thread-safety

A corner case occured if the mask were changed during initialization.
parent da293d9e
......@@ -108,11 +108,6 @@ static int Create( vlc_object_t *p_this )
config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options,
p_filter->p_cfg );
vlc_mutex_init( &p_sys->mask_lock );
psz_string =
var_CreateGetStringCommand( p_filter, CFG_PREFIX "mask" );
var_AddCallback( p_filter, CFG_PREFIX "mask", MaskCallback,
p_filter );
p_sys->p_mask = NULL;
if( psz_string && *psz_string )
{
......@@ -123,6 +118,11 @@ static int Create( vlc_object_t *p_this )
}
free( psz_string );
vlc_mutex_init( &p_sys->mask_lock );
psz_string =
var_CreateGetStringCommand( p_filter, CFG_PREFIX "mask" );
var_AddCallback( p_filter, CFG_PREFIX "mask", MaskCallback,
p_filter );
p_filter->pf_video_filter = Filter;
return VLC_SUCCESS;
......
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