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

Remove buggy and never used VLC_VAR_INHERITVALUE

InheritValue() is not thread-safe. It runs under the variable lock of
the object creating the new variabe. But it reads variables of parent
objects. This would require the variable lock of the parent object.

We still need to fix var_Create() with VLC_VAR_DOINHERIT.
parent c1f4a7df
......@@ -110,8 +110,6 @@
#define VLC_VAR_GETLIST 0x0025
#define VLC_VAR_CHOICESCOUNT 0x0026
#define VLC_VAR_INHERITVALUE 0x0030
#define VLC_VAR_SETISCOMMAND 0x0040
/**@}*/
......
......@@ -627,35 +627,6 @@ int __var_Change( vlc_object_t *p_this, const char *psz_name,
p_val->psz_string = p_var->psz_text ? strdup( p_var->psz_text )
: NULL;
break;
case VLC_VAR_INHERITVALUE:
{
vlc_value_t val;
if( InheritValue( p_this,
p_val2 ? p_val2->psz_string : psz_name,
&val, p_var->i_type )
== VLC_SUCCESS )
{
/* Duplicate already done */
/* Backup needed stuff */
oldval = p_var->val;
/* Check boundaries and list */
CheckValue( p_var, &val );
/* Set the variable */
p_var->val = val;
/* Free data if needed */
p_var->ops->pf_free( &oldval );
}
if( p_val )
{
*p_val = p_var->val;
p_var->ops->pf_dup( p_val );
}
}
break;
case VLC_VAR_SETISCOMMAND:
p_var->i_type |= VLC_VAR_ISCOMMAND;
break;
......
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