]> git.sesse.net Git - vlc/commitdiff
Fixed a potential race condition (projectm).
authorLaurent Aimar <fenrir@videolan.org>
Sat, 12 Dec 2009 21:16:19 +0000 (22:16 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 13 Dec 2009 12:52:36 +0000 (13:52 +0100)
modules/visualization/projectm.cpp

index 60452f1c0f5490f393f9dd367473d3ed396a8cc5..a5b3a7e5dc447a0e0900f6bafd6e0c81d6801349 100644 (file)
@@ -291,7 +291,6 @@ static void* Thread( vlc_object_t *p_this )
         vlc_sem_post( &p_thread->ready );
         return NULL;
     }
-    vlc_sem_post( &p_thread->ready );
 
     /* Initialize the opengl provider for this thread */
     p_thread->p_opengl->pf_init( p_thread->p_opengl );
@@ -302,6 +301,8 @@ static void* Thread( vlc_object_t *p_this )
     p_thread->p_buffer = (float*)malloc( p_thread->i_buffer_size *
                                          sizeof( float ) );
 
+    vlc_sem_post( &p_thread->ready );
+
     /* TODO: Give to projectm the name of the input
     p_thread->p_projectm->projectM_setTitle( "" ); */