libvlc_media_new seems to not work
Posted: 04 Apr 2009 22:16
Hi all,
No exception raised when calling the libvlc_media_new function but the program crash when using the libvlc_media_t pointers (with libvlc_media_release and with libvlc_mediaplayer_new_form_media).
Anyone has an idea why the crash appears?
Here is the code of my test function:
Thanks
No exception raised when calling the libvlc_media_new function but the program crash when using the libvlc_media_t pointers (with libvlc_media_release and with libvlc_mediaplayer_new_form_media).
Anyone has an idea why the crash appears?
Here is the code of my test function:
Code: Select all
const char * const vlc_args[] = {
"-I", "dummy", /* Don't use any interface */
"--ignore-config", /* Don't use VLC's config */
"--plugin-path=plugins" };
m_pVLCInstance = libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args, &m_VLCException);
if( libvlc_exception_raised(&m_VLCException) )
{
QMessageBox::warning(this, tr("error"), libvlc_exception_get_message(&m_VLCException), QMessageBox::Ok);
libvlc_exception_clear(&m_VLCException);
return;
}
libvlc_media_new(m_pVLCInstance, "test.avi", &m_VLCException);
if( libvlc_exception_raised(&m_VLCException) )
{
QMessageBox::warning(this, tr("error"), libvlc_exception_get_message(&m_VLCException), QMessageBox::Ok);
libvlc_exception_clear(&m_VLCException);
return;
}
m_pVLCPlayer = libvlc_media_player_new_from_media(m_pVLCMedia, &m_VLCException);
libvlc_media_release(m_pVLCMedia);