mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
videoio(MSMF): remove "always true" check
This commit is contained in:
parent
6c196d3066
commit
c3a90ccbad
@ -1056,17 +1056,14 @@ HRESULT SourceReaderCB::Wait(DWORD dwMilliseconds, _ComPtr<IMFSample>& videoSamp
|
|||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bEOS = m_bEOS;
|
||||||
if (!bEOS)
|
if (!bEOS)
|
||||||
{
|
{
|
||||||
cv::AutoLock lock(m_mutex);
|
cv::AutoLock lock(m_mutex);
|
||||||
bEOS = m_bEOS;
|
videoSample = m_lastSample;
|
||||||
if (!bEOS)
|
CV_Assert(videoSample);
|
||||||
{
|
m_lastSample.Release();
|
||||||
videoSample = m_lastSample;
|
ResetEvent(m_hEvent); // event is auto-reset, but we need this forced reset due time gap between wait() and mutex hold.
|
||||||
CV_Assert(videoSample);
|
|
||||||
m_lastSample.Release();
|
|
||||||
ResetEvent(m_hEvent); // event is auto-reset, but we need this forced reset due time gap between wait() and mutex hold.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_hrStatus;
|
return m_hrStatus;
|
||||||
|
Loading…
Reference in New Issue
Block a user