diff options
author | Underground78 <underground78@users.sourceforge.net> | 2013-11-19 23:41:07 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2013-11-21 02:08:48 +0400 |
commit | 692766f55fc0133bf85f7775f2da26800e33b201 (patch) | |
tree | 46ee4f578c6f91975fd82ea3308dcd0873a38c94 /src/filters/parser/BaseSplitter | |
parent | 782690b8cda668cc5cd8a89ff2ff90b0b0d0fb5c (diff) |
Cosmetics: Use CheckPointer.
Diffstat (limited to 'src/filters/parser/BaseSplitter')
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitter.cpp | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp index ebe78a1ad..70023f223 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp @@ -1300,12 +1300,12 @@ LPCTSTR CBaseSplitterFilter::GetPartFilename(IAsyncReader* pAsyncReader) STDMETHODIMP CBaseSplitterFilter::GetCapabilities(DWORD* pCapabilities)
{
- return pCapabilities ? *pCapabilities =
- AM_SEEKING_CanGetStopPos |
- AM_SEEKING_CanGetDuration |
- AM_SEEKING_CanSeekAbsolute |
- AM_SEEKING_CanSeekForwards |
- AM_SEEKING_CanSeekBackwards, S_OK : E_POINTER;
+ CheckPointer(pCapabilities, E_POINTER);
+
+ *pCapabilities = AM_SEEKING_CanGetStopPos | AM_SEEKING_CanGetDuration
+ | AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards | AM_SEEKING_CanSeekBackwards;
+
+ return S_OK;
}
STDMETHODIMP CBaseSplitterFilter::CheckCapabilities(DWORD* pCapabilities)
@@ -1337,7 +1337,11 @@ STDMETHODIMP CBaseSplitterFilter::QueryPreferredFormat(GUID* pFormat) STDMETHODIMP CBaseSplitterFilter::GetTimeFormat(GUID* pFormat)
{
- return pFormat ? *pFormat = TIME_FORMAT_MEDIA_TIME, S_OK : E_POINTER;
+ CheckPointer(pFormat, E_POINTER);
+
+ *pFormat = TIME_FORMAT_MEDIA_TIME;
+
+ return S_OK;
}
STDMETHODIMP CBaseSplitterFilter::IsUsingTimeFormat(const GUID* pFormat)
@@ -1398,17 +1402,32 @@ STDMETHODIMP CBaseSplitterFilter::GetAvailable(LONGLONG* pEarliest, LONGLONG* pL STDMETHODIMP CBaseSplitterFilter::SetRate(double dRate)
{
- return dRate > 0 ? m_dRate = dRate, S_OK : E_INVALIDARG;
+ HRESULT hr = E_INVALIDARG;
+
+ if (dRate > 0.0) {
+ m_dRate = dRate;
+ hr = S_OK;
+ }
+
+ return hr;
}
STDMETHODIMP CBaseSplitterFilter::GetRate(double* pdRate)
{
- return pdRate ? *pdRate = m_dRate, S_OK : E_POINTER;
+ CheckPointer(pdRate, E_POINTER);
+
+ *pdRate = m_dRate;
+
+ return S_OK;
}
STDMETHODIMP CBaseSplitterFilter::GetPreroll(LONGLONG* pllPreroll)
{
- return pllPreroll ? *pllPreroll = 0, S_OK : E_POINTER;
+ CheckPointer(pllPreroll, E_POINTER);
+
+ *pllPreroll = 0;
+
+ return S_OK;
}
HRESULT CBaseSplitterFilter::SetPositionsInternal(void* id, LONGLONG* pCurrent, DWORD dwCurrentFlags, LONGLONG* pStop, DWORD dwStopFlags)
|