Call FreeEventParams at end

This commit is contained in:
clsid2 committed 2024-07-08 00:26:09 +02:00
1 parent d370c5669a
commit 6d7f1d5a84
1 file changed
+3 -10
+3 -10
View File
@@ -2915,14 +2915,6 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
TRACE(_T("--> CMainFrame::OnGraphNotify on thread: %lu; event: 0x%08x (%ws)\n"), GetCurrentThreadId(), evCode, GetEventString(evCode));
}
#endif
CString str;
if (m_fCustomGraph) {
if (EC_BG_ERROR == evCode) {
str = CString((char*)evParam1);
}
}
hr = m_pME->FreeEventParams(evCode, evParam1, evParam2);
switch (evCode) {
case EC_PAUSED:
@@ -3251,8 +3243,9 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
}
break;
case EC_BG_ERROR:
UpdateCachedMediaState();
if (m_fCustomGraph) {
CString str = CString((char*)evParam1);
hr = m_pME->FreeEventParams(evCode, evParam1, evParam2);
SendMessage(WM_COMMAND, ID_FILE_CLOSEMEDIA);
m_closingmsg = !str.IsEmpty() ? str : CString(_T("Unspecified graph error"));
m_wndPlaylistBar.SetCurValid(false);
@@ -3290,7 +3283,7 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
}
}
return hr;
return m_pME->FreeEventParams(evCode, evParam1, evParam2);
}
LRESULT CMainFrame::OnResetDevice(WPARAM wParam, LPARAM lParam)