[vlc-devel] Deadlock when trying to reuse a media player after MediaPlayerEndReached

Pierre d'Herbemont pdherbemont at gmail.com
Sun Oct 25 19:17:52 CET 2009


On Oct 25, 2009, at 5:39 PM, Underground78 wrote:

> Hello,
>
> I am new to the LibVLC and I have followed the little LibVLC tutorial
> that can be found on the wiki (cf the other thread). Now I want to
> improve a bit the sample program to be able to load a stream from a
> playlist file but I run into problems.
>
> I use Windows XP and to make things easier I have gotten the libraries
> from ftp://ftp.videolan.org/pub/testing/vlc-1.0.3-rc/win32/vlc-1.0.3-rc-win32.7z
> (I have tried vlc-1.0.2-win32 too).
>
> To begin, I want to try to play a new media (without using the media
> parsed from the playlist) after the MediaPlayerEndReached event is
> triggered. But it seems to create a deadlock and the new media is
> never played (here the source code I use :
> http://pastebin.com/m5328b973 and the log :
> http://pastebin.com/mc500ead).
>
> What am I doing wrong ?

That's a libvlc limitation that we may address one day.

You can work around by asynchronously dispatching a new block from  
callback(). The block should be doing what you currently do in callback 
().

In current libvlc there is libvlc_event_attach_async(), that  
automatically does this async dispatch.

Pierre.





More information about the vlc-devel mailing list