Skip to content

libvlc_media_player_stop deadlock

I have been experiencing deadlocks when there are multiple media players in single application. The deadlock can occur on either a call to libvlc_media_player_play or libvlc_media_player_stop to all the media players. For example......

procedure TMainForm.StopButtonClick(Sender: TObject); Var i : integer; begin For i := 1 to 4 do Begin libvlc_media_player_stop(MediaPlayer[i], VLC_Exception); CheckError; End; end;

Sometimes you can stop/play them all and it is fine, so it might take a few play, stop, play, stop, play, stops to reproduce the problem. If you cannot repeat it straight away, close down the app and then restart it and do the play stop play stop routine.

The app contains 1 x instance of vlc (libvlc_new), 1 exception pointer, 4 x media (libvlc_media_new) and 4 x media players (libvlc_media_player_new);

The media i am loading to produce the issues are udp streams or avi files.

In this forum post (http://forum.videolan.org/viewtopic.php?f=32&t=54076) one member who also experiences the problem mentions it could be down to GetMessage, EventThread() in modules/video_output/msw/events.c.

Please could someone take a look?

Chris

Edited by beardless2
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information