Commit c71c8cbc authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

control/media_instance.c: Fix the dead lock reported by Olivier Aubert.

parent 33d697de
......@@ -231,11 +231,15 @@ void libvlc_media_instance_release( libvlc_media_instance_t *p_mi )
vlc_mutex_lock( &p_mi->object_lock );
p_mi->i_refcount--;
if( p_mi->i_refcount > 0 )
{
/* We hold the mutex, as a waiter to make sure pending operations
* are finished. We can't hold it longer as the get_input_thread
* function holds a lock. */
vlc_mutex_unlock( &p_mi->object_lock );
if( p_mi->i_refcount > 0 )
return;
}
release_input_thread( p_mi );
......
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