solve some issues according to code analysis result

This commit is contained in:
yuanyuanxiang
2024-12-27 01:40:40 +08:00
parent cdded1687d
commit a2975d9471
19 changed files with 106 additions and 50 deletions

View File

@@ -12,10 +12,6 @@ CSampleGrabberCB mCB;
CCaptureVideo::CCaptureVideo()
{
if(FAILED(CoInitialize(NULL)))
{
return;
}
m_pCapture = NULL;
m_pGB = NULL;
m_pMC = NULL;
@@ -23,6 +19,11 @@ CCaptureVideo::CCaptureVideo()
m_pBF = NULL;
m_pGrabber = NULL;
m_bExit = FALSE;
m_hWnd = NULL;
if (FAILED(CoInitialize(NULL)))
{
return;
}
}
CCaptureVideo::~CCaptureVideo()