[vlc-devel] libvlc_MediaMetaChanged event being sent too soon

Jason Butler jbutler at hcn-inc.com
Sat Jul 10 01:17:32 CEST 2010

I am using libvlc 1.1.0 to play an audio steam on Linux. I want to get 
the title, album, and artist every time the track changes so I am 
hooking up a callback function to the libvlc_MediaMetaChanged event. The 
problem is when the stream starts playing the libvlc_MediaMetaChanged 
event is sent serveral times before all the track meta data is valid. If 
I call  libvlc_media_get_meta(m,libvlc_meta_Artist), or 
libvlc_media_get_meta(m,libvlc_meta_Album) too soon then I get a segment 
fault.  I thought about waiting for the libvlc_MediaPlayerPlaying event 
but libvlc_MediaMetaChanged event is still sent several times before the 
album and artist data is valid.

Is there a way to check if the artist and album data is valid before 
calling  libvlc_media_get_meta?

More information about the vlc-devel mailing list