[vlc-devel] Deadlock on stop
Romain Vimont | ®om
rom at rom1v.com
Fri Apr 25 15:13:22 CEST 2014
I use libvlc in an Android application, and I experience a deadlock:
libvlc.stop() does never return in some cases.
I investigated a little, and found what is blocking when calling
libvlc_media_player_stop(…). Here is the stack of calls:
- release_input_thread( p_mi, true );
- input_Close( p_input_thread );
- input_Join( p_input );
- vlc_join( p_input->p->thread, NULL );
- vlc_sem_wait (&handle->finished); // block forever
This does not always happen, but only when I am already playing a video,
and try to play and stop nearly simultaneously (I stop playing by
pressing a key and start from a remote control at the same time), so it
seems there is a race condition.
Also, I reproduce it about ~25% using a UDP multicast stream
(udp://@220.127.116.11:1234/), but I can't reproduce if I use an HTTP stream,
the very same UDP stream proxyfied by udpxy
I guess there should be a call to vlc_sem_post() somewhere to wake it
up… Maybe you have an idea?
PS: my VLC versions:
More information about the vlc-devel