Playing a "Live Playlist HLS" and pressing stop forces VLC to hang/block for up to about 40 seconds
1st: This is not the deadlocking bug calling libvlc_media_player_stop from withing a thread having child windows.
Description: Playing a "Live Playlist HLS protocol version: 3" m3u8 playlist and pressing stop forces VLC to hang and stop responding to any further click. Sometimes vlc hangs for a few seconds up to 30-40 seconds. Closing VLC then leads to a zombie vlc.exe process without a visible windows. It happens all the time and it is very well reproducible.
Exactly the same problem happens using libvlc. Calling libvlc_media_player_stop while playing a "Live Playlist HLS protocol version: 3" m3u8 playlist can take up to 40 seconds.
I tracked down the issue to just liveplaylists without #EXT-X-ENDLIST at the end of the list (the missing ENDLIST-Line makes the playlist a live playist btw.).
I looking inside the VLC debug logs i noticed (verbose=2) after the wait time is over it continues with following lines:
main debug: removing module "access_http" main debug: TIMER input launching for 'http://127.0.0.1:9876/playlist.m3u8' : 1171.294 ms - Total 1171.294 ms / 1 intvls (Avg 1171.294 ms)
Looking at the callstack of my libvlc testapp i can see the call is blocking here
... :libvlc_media_player_stop ... :libvlccore.dll.vlc_timer_create :WaitForMultipleObjectsEx
So i guess there is a problem with the segment downloader Thread/Timer (what ever VLC uses) who 1st needs to timeout or something like that.
Tested on Windows 7, x64 with vlc x32 versions 2.0.4, todays latest 2.0.5 and latest 2.1.x nightly build. With VLC-Player itself and libvlc library.
Here you can find a attachment and a test m3u8 live playlist => http://mirror01.delight.ch/temp/VLC_HLS_Live_PlayList_BugReport.zip
Just extract it and play the File "test.m3u8" in VLC Player. Hit Stop after a few seconds and you will notice the picture is still visible and you can not play again immediately. If you close vlc it closes but the vlc.exe process is still there and will stay there as zombie until reboot (you can check it with taskman)