Destroying directly saves one Lookup.
{
aout_OutputDelete( p_aout );
aout_MixerDelete( p_aout );
{
aout_OutputDelete( p_aout );
aout_MixerDelete( p_aout );
- if ( var_Type( p_aout, "audio-device" ) != 0 )
- {
- var_Destroy( p_aout, "audio-device" );
- }
- if ( var_Type( p_aout, "audio-channels" ) != 0 )
- {
- var_Destroy( p_aout, "audio-channels" );
- }
+ var_Destroy( p_aout, "audio-device" );
+ var_Destroy( p_aout, "audio-channels" );
}
aout_unlock_mixer( p_aout );
}
aout_unlock_mixer( p_aout );
(void)psz_name; (void)oldval; (void)newval; (void)p_data;
if ( p_aout == NULL ) return VLC_SUCCESS;
(void)psz_name; (void)oldval; (void)newval; (void)p_data;
if ( p_aout == NULL ) return VLC_SUCCESS;
- if ( var_Type( p_aout, "audio-device" ) != 0 )
- {
- var_Destroy( p_aout, "audio-device" );
- }
- if ( var_Type( p_aout, "audio-channels" ) != 0 )
- {
- var_Destroy( p_aout, "audio-channels" );
- }
+ var_Destroy( p_aout, "audio-device" );
+ var_Destroy( p_aout, "audio-channels" );
aout_Restart( p_aout );
vlc_object_release( p_aout );
aout_Restart( p_aout );
vlc_object_release( p_aout );
{
/* This is supposed to be a significant change and supposes
* rebuilding the channel choices. */
{
/* This is supposed to be a significant change and supposes
* rebuilding the channel choices. */
- if ( var_Type( p_aout, "audio-channels" ) >= 0 )
- {
- var_Destroy( p_aout, "audio-channels" );
- }
+ var_Destroy( p_aout, "audio-channels" );
}
aout_Restart( p_aout );
return 0;
}
aout_Restart( p_aout );
return 0;