[vlc-commits] commit: Use var_Set* when applicable. ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Sat Oct 23 17:27:30 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Oct 23 17:15:40 2010 +0200| [19dc078e5acc868faaa78429718fe65cf343541a] | committer: Rémi Duraffort
Use var_Set* when applicable.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=19dc078e5acc868faaa78429718fe65cf343541a
---
src/audio_output/output.c | 9 +++------
src/osd/osd.c | 8 ++------
src/playlist/item.c | 5 +----
3 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 1bfb2d9..ee37b38 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -112,8 +112,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
{
/* Go directly to the left channel. */
p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT;
- val.i_int = AOUT_VAR_CHAN_LEFT;
- var_Set( p_aout, "audio-channels", val );
+ var_SetInteger( p_aout, "audio-channels", AOUT_VAR_CHAN_LEFT );
}
var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
NULL );
@@ -150,14 +149,12 @@ int aout_OutputNew( aout_instance_t * p_aout,
{
/* Go directly to the left channel. */
p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT;
- val.i_int = AOUT_VAR_CHAN_LEFT;
- var_Set( p_aout, "audio-channels", val );
+ var_SetInteger( p_aout, "audio-channels", AOUT_VAR_CHAN_LEFT );
}
var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
NULL );
}
- val.b_bool = true;
- var_Set( p_aout, "intf-change", val );
+ var_SetBool( p_aout, "intf-change", true );
aout_FormatPrepare( &p_aout->output.output );
diff --git a/src/osd/osd.c b/src/osd/osd.c
index 086abf8..21bd762 100644
--- a/src/osd/osd.c
+++ b/src/osd/osd.c
@@ -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-visible", false );
- val.p_address = p_osd;
- var_Set( p_this->p_libvlc, "osd-object", val );
+ var_SetAddress( p_this->p_libvlc, "osd-object", p_osd );
}
else
p_osd = val.p_address;
@@ -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 )
{
- vlc_value_t val;
-
var_Destroy( p_osd, "osd-menu-visible" );
var_Destroy( p_osd, "osd-menu-update" );
osd_ParserUnload( p_osd );
- val.p_address = NULL;
- var_Set( p_this->p_libvlc, "osd-object", val );
+ var_SetAddress( p_this->p_libvlc, "osd-object", NULL );
}
vlc_object_release( p_osd );
diff --git a/src/playlist/item.c b/src/playlist/item.c
index ffb5464..0de77a5 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -714,10 +714,7 @@ void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
add.i_item = i_item_id;
add.i_node = i_node_id;
- vlc_value_t val;
- val.p_address = &add;
-
- var_Set( p_playlist, "playlist-item-append", val );
+ var_SetAddress( p_playlist, "playlist-item-append", &add );
}
/***************************************************************************
More information about the vlc-commits
mailing list