]> git.sesse.net Git - vlc/commitdiff
Give only once the same PCM buffer to projectM.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 13 Dec 2009 12:22:05 +0000 (13:22 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 13 Dec 2009 12:52:37 +0000 (13:52 +0100)
modules/visualization/projectm.cpp

index 42475fd39ac83f6d39587cabd0f0510f0e113ecd..2e173b3c3ce6b3bc8fff09980a73df35fabd2e3d 100644 (file)
@@ -335,9 +335,11 @@ static void *Thread( void *p_data )
         /* Render the image and swap the buffers */
         vlc_mutex_lock( &p_sys->lock );
         if( p_sys->i_nb_samples > 0 )
+        {
             p_sys->p_projectm->pcm()->addPCMfloat( p_sys->p_buffer,
                                                    p_sys->i_nb_samples );
-
+            p_sys->i_nb_samples = 0;
+        }
         p_sys->p_projectm->renderFrame();
         vlc_mutex_unlock( &p_sys->lock );