Commit 4247f7ce authored by Rafaël Carré's avatar Rafaël Carré

Check cond_wait() return value - Fix a deadlock

Remove useless variable
parent b5cb6965
......@@ -145,14 +145,11 @@ int playlist_ThreadDestroy( playlist_t * p_playlist )
*/
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 )
{
......@@ -162,8 +159,10 @@ static void RunControlThread ( playlist_t *p_playlist )
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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment