diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-05-10 18:46:04 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2013-05-10 22:31:53 +0400 |
commit | b45f3796b0143e35a8ab7e3242bd05a8913e89a8 (patch) | |
tree | 116b8099582bde968e8635619301fc39db245ba6 /src/filters/parser/AviSplitter | |
parent | 6dc7f3e6e8542e426495cd9c83f6e53ccf0a3e76 (diff) |
Use IsEmpty() instead of GetCount() when possible.
Diffstat (limited to 'src/filters/parser/AviSplitter')
-rw-r--r-- | src/filters/parser/AviSplitter/AviFile.cpp | 8 | ||||
-rw-r--r-- | src/filters/parser/AviSplitter/AviSplitter.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/filters/parser/AviSplitter/AviFile.cpp b/src/filters/parser/AviSplitter/AviFile.cpp index c134b15fc..b94ef77f8 100644 --- a/src/filters/parser/AviSplitter/AviFile.cpp +++ b/src/filters/parser/AviSplitter/AviFile.cpp @@ -49,11 +49,11 @@ HRESULT CAviFile::Init() Seek(0);
HRESULT hr = Parse(0, GetLength());
UNREFERENCED_PARAMETER(hr);
- if (m_movis.GetCount() == 0) { // FAILED(hr) is allowed as long as there was a movi chunk found
+ if (m_movis.IsEmpty()) { // FAILED(hr) is allowed as long as there was a movi chunk found
return E_FAIL;
}
- if (m_avih.dwStreams == 0 && m_strms.GetCount() > 0) {
+ if (m_avih.dwStreams == 0 && !m_strms.IsEmpty()) {
m_avih.dwStreams = (DWORD)m_strms.GetCount();
}
@@ -220,7 +220,7 @@ HRESULT CAviFile::Parse(DWORD parentid, __int64 end) }
if (m_isamv) {
// First alway video, second always audio
- strm->strh.fccType = m_strms.GetCount() == 0 ? FCC('vids') : FCC('amva');
+ strm->strh.fccType = m_strms.IsEmpty() ? FCC('vids') : FCC('amva');
strm->strh.dwRate = m_avih.dwReserved[0] * 1000; // dwReserved[0] = fps!
strm->strh.dwScale = 1000;
}
@@ -597,7 +597,7 @@ DWORD CAviFile::strm_t::GetFrame(REFERENCE_TIME rt) {
DWORD frame;
- if (strh.dwScale == 0 || rt <= 0 || cs.GetCount() == 0) {
+ if (strh.dwScale == 0 || rt <= 0 || cs.IsEmpty()) {
frame = 0;
} else if (strh.fccType == FCC('auds')) {
WAVEFORMATEX* wfe = (WAVEFORMATEX*)strf.GetData();
diff --git a/src/filters/parser/AviSplitter/AviSplitter.cpp b/src/filters/parser/AviSplitter/AviSplitter.cpp index eb53990db..8b817c8fe 100644 --- a/src/filters/parser/AviSplitter/AviSplitter.cpp +++ b/src/filters/parser/AviSplitter/AviSplitter.cpp @@ -193,7 +193,7 @@ HRESULT CAviSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) bool fHasIndex = false;
for (unsigned int i = 0; !fHasIndex && i < m_pFile->m_strms.GetCount(); ++i) {
- if (m_pFile->m_strms[i]->cs.GetCount() > 0) {
+ if (!m_pFile->m_strms[i]->cs.IsEmpty()) {
fHasIndex = true;
}
}
@@ -201,7 +201,7 @@ HRESULT CAviSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) for (unsigned int i = 0; i < m_pFile->m_strms.GetCount(); ++i) {
CAviFile::strm_t* s = m_pFile->m_strms[i];
- if (fHasIndex && s->cs.GetCount() == 0) {
+ if (fHasIndex && s->cs.IsEmpty()) {
continue;
}
@@ -379,7 +379,7 @@ HRESULT CAviSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) m_tFrame.Attach(DEBUG_NEW DWORD[m_pFile->m_avih.dwStreams]);
- return m_pOutputs.GetCount() > 0 ? S_OK : E_FAIL;
+ return !m_pOutputs.IsEmpty() ? S_OK : E_FAIL;
}
bool CAviSplitterFilter::DemuxInit()
@@ -395,7 +395,7 @@ bool CAviSplitterFilter::DemuxInit() bool fReIndex = false;
for (DWORD i = 0; i < m_pFile->m_avih.dwStreams && !fReIndex; ++i) {
- if (m_pFile->m_strms[i]->cs.GetCount() == 0 && GetOutputPin(i)) {
+ if (m_pFile->m_strms[i]->cs.IsEmpty() && GetOutputPin(i)) {
fReIndex = true;
}
}
|