Switching fullscreen causes a brief UnregisterAudioCallback/RegsisterAudioCallback.
If this occurs while audio thread is inside VizPacket then we segfault on dereferencing m_pCallback.
Using the m_critSection lock means the higher level test for m_pCallback will protect us.
void COMXAudio::RegisterAudioCallback(IAudioCallback *pCallback)
{
+ CSingleLock lock (m_critSection);
if(!m_Passthrough && !m_HWDecode)
{
m_pCallback = pCallback;
void COMXAudio::UnRegisterAudioCallback()
{
+ CSingleLock lock (m_critSection);
m_pCallback = NULL;
}