[vlc-devel] [PATCH] lib: fix typos in libvlc_media_player_set_equalizer

Adrien Maglo magsoft at gmail.com
Mon Jun 16 16:47:44 CEST 2014


This commit repairs the libvlc equalizer API.
---
 lib/media_player.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/media_player.c b/lib/media_player.c
index 4477a6a..5225079 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1497,7 +1497,7 @@ int libvlc_media_player_set_equalizer( libvlc_media_player_t *p_mi, libvlc_equal
     {
         for( unsigned i = 0, c = 0; i < EQZ_BANDS_MAX; i++ )
         {
-            c = snprintf( bands + c, sizeof(bands) - c, " %.07f",
+            c += snprintf( bands + c, sizeof(bands) - c, " %.07f",
                           p_equalizer->f_amp[i] );
             if( unlikely(c >= sizeof(bands)) )
                 return -1;
@@ -1517,7 +1517,7 @@ int libvlc_media_player_set_equalizer( libvlc_media_player_t *p_mi, libvlc_equal
             var_SetString( p_aout, "equalizer-bands", bands );
         }
 
-        var_SetString( p_mi, "audio-filter", p_equalizer ? "equalizer" : "" );
+        var_SetString( p_aout, "audio-filter", p_equalizer ? "equalizer" : "" );
         vlc_object_release( p_aout );
     }
 
-- 
1.9.1




More information about the vlc-devel mailing list