Postby alb84 » 19 Apr 2010 12:37
Actually I commented the mutex and all the calls to CreateMutex, WaitForSingleObject, ReleaseMutex, and CloseHandle and run the code on a single core machine.
What I do is just call all the init stuff
...
m_vlcMediaplayer = libvlc_media_player_new( m_vlcInstance, &m_ex );
...
libvlc_media_player_play( m_vlcMediaplayer, &m_ex );
and the stop stuff
...
libvlc_media_player_stop( m_vlcMediaplayer, &m_ex );
...
libvlc_media_player_release( m_vlcMediaplayer );
...
I call no mutex stuff in the lock and unlock vmem callbacks.
Yet, even like this, sometimes the player is succesfully released, and sometimes not, and my gui freezes.
How the thread automatically created by libvlc works?
Is there an example to have an asynchronous stop work correctly?