]> git.sesse.net Git - vlc/blobdiff - modules/visualization/projectm.cpp
Give only once the same PCM buffer to projectM.
[vlc] / 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 );