Commit 19dc078e authored by Rémi Duraffort's avatar Rémi Duraffort

Use var_Set* when applicable.

parent 3119a2c5
...@@ -112,8 +112,7 @@ int aout_OutputNew( aout_instance_t * p_aout, ...@@ -112,8 +112,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
{ {
/* Go directly to the left channel. */ /* Go directly to the left channel. */
p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT; p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT;
val.i_int = AOUT_VAR_CHAN_LEFT; var_SetInteger( p_aout, "audio-channels", AOUT_VAR_CHAN_LEFT );
var_Set( p_aout, "audio-channels", val );
} }
var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart, var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
NULL ); NULL );
...@@ -150,14 +149,12 @@ int aout_OutputNew( aout_instance_t * p_aout, ...@@ -150,14 +149,12 @@ int aout_OutputNew( aout_instance_t * p_aout,
{ {
/* Go directly to the left channel. */ /* Go directly to the left channel. */
p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT; p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT;
val.i_int = AOUT_VAR_CHAN_LEFT; var_SetInteger( p_aout, "audio-channels", AOUT_VAR_CHAN_LEFT );
var_Set( p_aout, "audio-channels", val );
} }
var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart, var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
NULL ); NULL );
} }
val.b_bool = true; var_SetBool( p_aout, "intf-change", true );
var_Set( p_aout, "intf-change", val );
aout_FormatPrepare( &p_aout->output.output ); aout_FormatPrepare( &p_aout->output.output );
......
...@@ -200,8 +200,7 @@ osd_menu_t *osd_MenuCreate( vlc_object_t *p_this, const char *psz_file ) ...@@ -200,8 +200,7 @@ osd_menu_t *osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
var_SetBool( p_osd, "osd-menu-update", false ); var_SetBool( p_osd, "osd-menu-update", false );
var_SetBool( p_osd, "osd-menu-visible", false ); var_SetBool( p_osd, "osd-menu-visible", false );
val.p_address = p_osd; var_SetAddress( p_this->p_libvlc, "osd-object", p_osd );
var_Set( p_this->p_libvlc, "osd-object", val );
} }
else else
p_osd = val.p_address; p_osd = val.p_address;
...@@ -227,13 +226,10 @@ void osd_MenuDelete( vlc_object_t *p_this, osd_menu_t *p_osd ) ...@@ -227,13 +226,10 @@ void osd_MenuDelete( vlc_object_t *p_this, osd_menu_t *p_osd )
if( vlc_internals( VLC_OBJECT(p_osd) )->i_refcount == 1 ) if( vlc_internals( VLC_OBJECT(p_osd) )->i_refcount == 1 )
{ {
vlc_value_t val;
var_Destroy( p_osd, "osd-menu-visible" ); var_Destroy( p_osd, "osd-menu-visible" );
var_Destroy( p_osd, "osd-menu-update" ); var_Destroy( p_osd, "osd-menu-update" );
osd_ParserUnload( p_osd ); osd_ParserUnload( p_osd );
val.p_address = NULL; var_SetAddress( p_this->p_libvlc, "osd-object", NULL );
var_Set( p_this->p_libvlc, "osd-object", val );
} }
vlc_object_release( p_osd ); vlc_object_release( p_osd );
......
...@@ -714,10 +714,7 @@ void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id, ...@@ -714,10 +714,7 @@ void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
add.i_item = i_item_id; add.i_item = i_item_id;
add.i_node = i_node_id; add.i_node = i_node_id;
vlc_value_t val; var_SetAddress( p_playlist, "playlist-item-append", &add );
val.p_address = &add;
var_Set( p_playlist, "playlist-item-append", val );
} }
/*************************************************************************** /***************************************************************************
......
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