[vlc-devel] Deadlock on stop
Romain Vimont | ®om
rom at rom1v.com
Fri Apr 25 15:13:22 CEST 2014
Hi,
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://@239.0.0.1:1234/), but I can't reproduce if I use an HTTP stream,
the very same UDP stream proxyfied by udpxy
(http://<udpxy>/udp/239.0.0.1:1234):
http://www.udpxy.com/index-en.html
I guess there should be a call to vlc_sem_post() somewhere to wake it
up… Maybe you have an idea?
Regards,
PS: my VLC versions:
git://git.videolan.org/vlc.git (3b7bfa1)
git://git.videolan.org/vlc-ports/android.git (995ac44)
More information about the vlc-devel
mailing list