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

variables: pass VLC_VAR_SETSTEP parameter by value

parent 880bfc72
......@@ -398,7 +398,7 @@ static vlc_v4l2_ctrl_t *ControlAddInteger (vlc_object_t *obj, int fd,
if (query->step != 1)
{
val.i_int = query->step;
var_Change (obj, c->name, VLC_VAR_SETSTEP, &val);
var_Change(obj, c->name, VLC_VAR_SETSTEP, val);
}
return c;
}
......
......@@ -455,7 +455,7 @@ int (var_Change)(vlc_object_t *p_this, const char *psz_name, int i_action, ...)
break;
case VLC_VAR_SETSTEP:
assert(p_var->ops->pf_free == FreeDummy);
p_var->step = *va_arg(ap, vlc_value_t *);
p_var->step = va_arg(ap, vlc_value_t);
CheckValue( p_var, &p_var->val );
break;
case VLC_VAR_GETSTEP:
......
......@@ -306,7 +306,7 @@ static void test_limits( libvlc_int_t *p_libvlc )
assert( var_GetInteger( p_libvlc, "bla" ) == 12345 );
val.i_int = 42;
var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &val );
var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, val );
var_SetInteger( p_libvlc, "bla", 20 );
val.i_int = 0;
var_Change( p_libvlc, "bla", VLC_VAR_GETSTEP, &val );
......@@ -360,7 +360,7 @@ static void test_change( libvlc_int_t *p_libvlc )
var_Create( p_libvlc, "bla", VLC_VAR_INTEGER );
var_Change( p_libvlc, "bla", VLC_VAR_SETMINMAX, min, max );
var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &step );
var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, step );
var_SetInteger( p_libvlc, "bla", 13 );
assert( var_GetInteger( p_libvlc, "bla" ) == 13 );
......@@ -413,7 +413,7 @@ static void test_creation_and_type( libvlc_int_t *p_libvlc )
assert( var_Change( p_libvlc, "bla" , VLC_VAR_GETSTEP, &val ) != 0 );
val.i_int = 4212;
var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &val );
var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, val );
assert( var_Change( p_libvlc, "bla" , VLC_VAR_GETSTEP, &val ) == 0
&& val.i_int == 4212 );
......
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