Commit 4df3ca84 authored by Antoine Cellerier's avatar Antoine Cellerier

if we var_Create with DOINHERIT|ISCOMMAND and ISCOMMAND isn't set on the...

if we var_Create with DOINHERIT|ISCOMMAND and ISCOMMAND isn't set on the source variable, then inherit anyway and add ISCOMMAND to the type. 
parent 74c4a79a
......@@ -168,13 +168,15 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
if( i_new >= 0 )
{
/* If the types differ, variable creation failed. */
if( (i_type & ~VLC_VAR_DOINHERIT) != p_this->p_vars[i_new].i_type )
if( (i_type & ~(VLC_VAR_DOINHERIT|VLC_VAR_ISCOMMAND)) != p_this->p_vars[i_new].i_type )
{
vlc_mutex_unlock( &p_this->var_lock );
return VLC_EBADVAR;
}
p_this->p_vars[i_new].i_usage++;
if( i_type & VLC_VAR_ISCOMMAND )
p_this->p_vars[i_new].i_type |= VLC_VAR_ISCOMMAND;
vlc_mutex_unlock( &p_this->var_lock );
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