Commit 6aea9319 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: Fix a possible dead lock when the playlist is killed.

We do maintain a lock around vlc_object_alive() because we want to make sure we won't miss the point when a concurrent thread will call vlc_object_kill(), that is set b_die and vlc_object_signal(). If we missed b_die and the signal, next vlc_object_wait() will dead lock.
parent 6db16f08
......@@ -155,6 +155,11 @@ static void RunControlThread ( playlist_t *p_playlist )
playlist_MainLoop( p_playlist );
PL_LOCK;
/* The playlist lock has been unlocked, so we can't tell if
* someone has killed us in the meantime. Check now. */
if( !vlc_object_alive( p_playlist ) )
break;
if( p_playlist->b_cant_sleep )
{
/* 100 ms is an acceptable delay for playlist operations */
......
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