Commit 4f8856ee authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix deadlock

parent a20b50b6
......@@ -515,12 +515,15 @@ vlc_bool_t __vlc_object_wait( vlc_object_t *obj )
vlc_assert_locked( &obj->object_lock );
int fd = obj->p_internals->pipes[0];
if( ( fd != -1 )
&& ( read( fd, &(char){ 0 }, 1 ) == 0 ) )
if( fd != -1 )
{
close( fd );
obj->p_internals->pipes[1] = -1;
}
if( read( fd, &(char){ 0 }, 1 ) == 0 )
{
close( fd );
obj->p_internals->pipes[1] = -1;
}
return obj->b_die;
}
vlc_cond_wait( &obj->object_wait, &obj->object_lock );
return obj->b_die;
......
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