*/
static void RunControlThread ( playlist_t *p_playlist )
{
- int i_loops = 0;
-
/* Tell above that we're ready */
vlc_thread_ready( p_playlist );
+
while( !p_playlist->b_die )
{
- i_loops++;
-
playlist_MainLoop( p_playlist );
if( p_playlist->b_cant_sleep )
{
else
{
PL_LOCK;
- vlc_cond_wait( &p_playlist->object_wait, &p_playlist->object_lock );
+ vlc_bool_t b_die = vlc_object_wait( p_playlist );
PL_UNLOCK;
+ if( b_die )
+ break;
}
}
playlist_LastLoop( p_playlist );