[vlc-devel] commit: Used aout_EnableFilter in skins2. (Laurent Aimar )

git version control git at videolan.org
Tue Aug 25 23:29:21 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Aug 25 23:12:36 2009 +0200| [74d08390d5b1025552e4903e8d66ddbfce915422] | committer: Laurent Aimar 

Used aout_EnableFilter in skins2.

It avoids a race condition with aout_input_t contents.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74d08390d5b1025552e4903e8d66ddbfce915422
---

 modules/gui/skins2/commands/cmd_audio.cpp |   32 +----------------------------
 1 files changed, 1 insertions(+), 31 deletions(-)

diff --git a/modules/gui/skins2/commands/cmd_audio.cpp b/modules/gui/skins2/commands/cmd_audio.cpp
index ea56585..212b8b7 100644
--- a/modules/gui/skins2/commands/cmd_audio.cpp
+++ b/modules/gui/skins2/commands/cmd_audio.cpp
@@ -30,37 +30,7 @@
 
 void CmdSetEqualizer::execute()
 {
-    aout_instance_t *pAout = NULL;
-
-    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-    input_thread_t *pInput = playlist_CurrentInput( pPlaylist );
-    if( pInput )
-        pAout = input_GetAout( pInput );
-
-    // XXX
-    string filters;
-    if( m_enable)
-    {
-        filters = "equalizer";
-    }
-
-    if( pAout )
-    {
-        var_SetString( pAout, "audio-filter", (char*)filters.c_str() );
-        for( int i = 0; i < pAout->i_nb_inputs; i++ )
-        {
-            pAout->pp_inputs[i]->b_restart = true;
-        }
-    }
-    else
-    {
-        config_PutPsz( getIntf(), "audio-filter", filters.c_str() );
-    }
-
-    if( pAout )
-        vlc_object_release( pAout );
-    if( pInput )
-        vlc_object_release( pInput );
+    aout_EnableFilter( getIntf(), "equalizer", m_enable );
 }
 
 void CmdVolumeChanged::execute()




More information about the vlc-devel mailing list