[vlc-commits] audiobargraph_a: fix counter wrapping

Rafaël Carré git at videolan.org
Wed Apr 16 14:46:39 CEST 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Apr 16 13:55:22 2014 +0200| [61368353e10eed49d66ccfaae1534816c885b744] | committer: Rafaël Carré

audiobargraph_a: fix counter wrapping

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

 modules/audio_filter/audiobargraph_a.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/audio_filter/audiobargraph_a.c b/modules/audio_filter/audiobargraph_a.c
index 0b019c2..de71cb6 100644
--- a/modules/audio_filter/audiobargraph_a.c
+++ b/modules/audio_filter/audiobargraph_a.c
@@ -245,11 +245,9 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
         }
     }
 
-    if (p_sys->counter > p_sys->bargraph_repetition*100)
+    if (++p_sys->counter > p_sys->bargraph_repetition*100)
         p_sys->counter = 0;
 
-    p_sys->counter++;
-
     return p_in_buf;
 }
 



More information about the vlc-commits mailing list