Crash playing CDDA Audio
Posted: 22 Apr 2024 10:55
I have some simple code that that tries to play CD audio from a CD, It works around 50% of the time. The other times it crashes with a critical error in the heap with the call stack pointing to a free in Win32DebugOutputMsg. I am using 3.0.20 of libvlc. Here is the code I am using to play the CD.
Here is a picture of the callstack.
https://drive.google.com/file/d/1YEd8d7 ... drive_link
Any ideas, The Crash appears to happen after the call to "m_libvlc_media_list_player_play" and the debug output is as follows
It looks like something is corrupting the heap and at a random free it crashes. Is there something wrong with my calling code?
Thanks
Code: Select all
libvlc_instance_t * pVLCInstance = m_libvlc_new(0, NULL);
if (pVLCInstance)
{
libvlc_media_t * pVLCMedia = m_libvlc_media_new_location(pVLCInstance, "cdda:///e:/");
if (pVLCMedia)
{
m_libvlc_media_parse_with_options(pVLCMedia, libvlc_media_fetch_network, 10000);
libvlc_media_list_t * pVLCMediaList = m_libvlc_media_list_new(pVLCInstance);
if (pVLCMediaList)
{
m_libvlc_media_list_add_media(pVLCMediaList, pVLCMedia);
libvlc_media_list_player_t *pVLCMediaListPlayer = m_libvlc_media_list_player_new(pVLCInstance);
if (pVLCMediaListPlayer)
{
m_libvlc_media_list_player_set_media_list(pVLCMediaListPlayer, pVLCMediaList);
int iCount = m_libvlc_media_list_count(pVLCMediaList);
m_libvlc_media_list_player_play(pVLCMediaListPlayer);
Sleep(20000);
m_libvlc_media_list_player_stop(pVLCMediaListPlayer);
m_libvlc_media_list_player_release(pVLCMediaListPlayer);
pVLCMediaListPlayer = NULL;
}
m_libvlc_media_list_release(pVLCMediaList);
pVLCMediaList = NULL;
}
m_libvlc_media_release(pVLCMedia);
pVLCMedia = NULL;
}
m_libvlc_release(pVLCInstance);
}
}
https://drive.google.com/file/d/1YEd8d7 ... drive_link
Any ideas, The Crash appears to happen after the call to "m_libvlc_media_list_player_play" and the debug output is as follows
Code: Select all
main generic debug: keeping audio output
main input debug: Creating an input for 'cdda:///e:/'
main input debug: using timeshift granularity of 50 MiB
main input debug: using timeshift path: C:\Users\matt.DCA\AppData\Local\Temp
main input debug: `cdda:///e:/' gives access `cdda' demux `any' path `/e:/'
main input source debug: creating demux: access='cdda' demux='any' location='/e:/' file='e:\'
main demux debug: looking for access_demux module matching "cdda": 15 candidates
cdda demux debug: using winNT/2K/XP ioctl layer
main demux debug: no access_demux modules matched
main stream debug: creating access: cdda:///e:/
main stream debug: (path: e:\)
main stream debug: looking for access module matching "cdda": 27 candidates
cdda stream debug: using winNT/2K/XP ioctl layer
cdda stream debug: p_sectors: 0, 0
cdda stream debug: p_sectors: 1, 14921
cdda stream debug: p_sectors: 2, 38956
cdda stream debug: p_sectors: 3, 59237
cdda stream debug: p_sectors: 4, 80256
cdda stream debug: p_sectors: 5, 97353
cdda stream debug: p_sectors: 6, 115171
cdda stream debug: p_sectors: 7, 130919
cdda stream debug: p_sectors: 8, 146766
cdda stream debug: p_sectors: 9, 164434
cdda stream debug: p_sectors: 10, 184589
cdda stream debug: p_sectors: 11, 203297
cdda stream debug: p_sectors: 12, 220026
cdda stream debug: p_sectors: 13, 238495
cdda stream debug: p_sectors: 14, 252452
cdda stream debug: p_sectors: 15, 269195
cdda stream debug: p_sectors: 16, 285428
Critical error detected c0000374
VLCTest.exe has triggered a breakpoint.
Thanks