diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-23 15:02:35 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-23 15:02:35 +0300 |
commit | 06b4363991ae1340ab7d5e00a0866cf0a1e2c497 (patch) | |
tree | c96aa1a2a6aa164eb09e11b8ed9bdec4e87ebc1c /decoder/LAVVideo | |
parent | 2ac84d258c336d696decfe6fd1236fbca52007eb (diff) |
Simplify :Stop, wrap original function instead of replacing it
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r-- | decoder/LAVVideo/LAVVideo.cpp | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp index 7b6d3967..2cacd37d 100644 --- a/decoder/LAVVideo/LAVVideo.cpp +++ b/decoder/LAVVideo/LAVVideo.cpp @@ -1024,39 +1024,8 @@ STDMETHODIMP CLAVVideo::Stop() m_bFlushing = TRUE; } - CAutoLock lck1(&m_csFilter); - if (m_State == State_Stopped) { - return NOERROR; - } - - // Succeed the Stop if we are not completely connected - ASSERT(m_pInput == NULL || m_pOutput != NULL); - if (m_pInput == NULL || m_pInput->IsConnected() == FALSE || m_pOutput->IsConnected() == FALSE) { - m_State = State_Stopped; - m_bEOSDelivered = FALSE; - return NOERROR; - } - - ASSERT(m_pInput); - ASSERT(m_pOutput); - - // decommit the input pin before locking or we can deadlock - m_pInput->Inactive(); - - // synchronize with Receive calls - - CAutoLock lck2(&m_csReceive); - m_pOutput->Inactive(); - - // allow a class derived from CTransformFilter - // to know about starting and stopping streaming - - HRESULT hr = StopStreaming(); - if (SUCCEEDED(hr)) { - // complete the state transition - m_State = State_Stopped; - m_bEOSDelivered = FALSE; - } + // actually perform the stop + HRESULT hr = __super::Stop(); // unblock delivery again, if we continue receiving frames m_bFlushing = FALSE; |