I'm using simple media players...
a unique inst, media_new, player_new_from_media, event_manager, media_release, player_play...
the event is libvlc_MediaPlayerEndReached
when I get the event, I add my structure which contains all the above references to a list to later be deleted, and mark the current time.
A timer event later fires, and checks the list of expired players. (I did this, because releasing within the callback event is bad).
the later event sequence is
player_stop, event_detach, player_release, libvlc_release, after which I will release the drawable that was passed as the vmem options to the instance.
the last libvlc_release hangs. I didn't see a release for the event manager.
Does the instance have to be released by exactly the same thread that created it? that will be tough, since the one that created it no longer exists.