Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2012-05-27 13:08:33 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2012-05-27 13:08:33 +0400
commitf829a8f5b1237ea931aa4eb1965110084a990149 (patch)
treef46ac1ecf4fb8983eecf768ef2e580154fc21c6e /src/filters/parser
parenta12d0819f8acd45a99431577831a3aa5f81284b2 (diff)
use a space after if, for, while
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4907 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser')
-rw-r--r--src/filters/parser/AviSplitter/AviFile.cpp4
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.cpp2
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp38
-rw-r--r--src/filters/parser/MatroskaSplitter/MatroskaFile.cpp30
-rw-r--r--src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp6
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.cpp2
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.h10
-rw-r--r--src/filters/parser/OggSplitter/OggSplitter.cpp2
-rw-r--r--src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp18
9 files changed, 56 insertions, 56 deletions
diff --git a/src/filters/parser/AviSplitter/AviFile.cpp b/src/filters/parser/AviSplitter/AviFile.cpp
index fa5c451bd..3685d1be2 100644
--- a/src/filters/parser/AviSplitter/AviFile.cpp
+++ b/src/filters/parser/AviSplitter/AviFile.cpp
@@ -285,7 +285,7 @@ HRESULT CAviFile::Parse(DWORD parentid, __int64 end)
}
break;
case FCC('vprp'):
- //if(S_OK != Read(m_vprp)) return E_FAIL;
+ //if (S_OK != Read(m_vprp)) return E_FAIL;
break;
case FCC('idx1'):
ASSERT(m_idx1 == NULL);
@@ -477,7 +477,7 @@ bool CAviFile::IsInterleaved(bool fKeepInfo)
return true;
}
/*
- if(m_avih.dwFlags&AVIF_ISINTERLEAVED) // not reliable, nandub can write f*cked up files and still sets it
+ if (m_avih.dwFlags&AVIF_ISINTERLEAVED) // not reliable, nandub can write f*cked up files and still sets it
return true;
*/
for (DWORD i = 0; i < m_avih.dwStreams; ++i) {
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
index 433b6e9c7..9796727c3 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
@@ -1087,7 +1087,7 @@ bool CBaseSplitterFilter::IsAnyPinDrying()
int count = pPin->QueueCount();
int size = pPin->QueueSize();
if (!pPin->IsDiscontinuous() && (count < MINPACKETS || size < MINPACKETSIZE)) {
- // if(m_priority != THREAD_PRIORITY_ABOVE_NORMAL && (count < MINPACKETS/3 || size < MINPACKETSIZE/3))
+ // if (m_priority != THREAD_PRIORITY_ABOVE_NORMAL && (count < MINPACKETS/3 || size < MINPACKETSIZE/3))
if (m_priority != THREAD_PRIORITY_BELOW_NORMAL && (count < MINPACKETS/3 || size < MINPACKETSIZE/3)) {
// SetThreadPriority(m_hThread, m_priority = THREAD_PRIORITY_ABOVE_NORMAL);
POSITION pos = m_pOutputs.GetHeadPosition();
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
index e79f950aa..ed7d4c7f9 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
@@ -63,7 +63,7 @@ bool CBaseSplitterFileEx::NextMpegStartCode(BYTE& code, __int64 len)
//
-#define MARKER if(BitRead(1) != 1) {ASSERT(0); return false;}
+#define MARKER if (BitRead(1) != 1) {ASSERT(0); return false;}
bool CBaseSplitterFileEx::Read(pshdr& h)
{
@@ -1357,7 +1357,7 @@ bool CBaseSplitterFileEx::Read(pvahdr& h, bool fSync)
if (!Read(h2, b)) {
return false;
}
- // Maybe bug, code before: if(h.fpts = h2.fpts) h.pts = h2.pts;
+ // Maybe bug, code before: if (h.fpts = h2.fpts) h.pts = h2.pts;
h.fpts = h2.fpts;
if (h.fpts) {
h.pts = h2.pts;
@@ -1805,60 +1805,60 @@ bool CBaseSplitterFileEx::Read(avchdr& h, spsppsindex index)
h.views = (unsigned int) gb.UExpGolombRead()+1;
/*
- for(unsigned int i = 0; i < h.views; i++) {
+ for (unsigned int i = 0; i < h.views; i++) {
gb.UExpGolombRead(); // view_id
}
- for(unsigned int i = 1; i < h.views; i++) {
- for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_anchor_refs_l0
+ for (unsigned int i = 1; i < h.views; i++) {
+ for (int j = 0; j < gb.UExpGolombRead(); j++) { // num_anchor_refs_l0
gb.UExpGolombRead(); // anchor_refs_l0
}
- for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_anchor_refs_l1
+ for (int j = 0; j < gb.UExpGolombRead(); j++) { // num_anchor_refs_l1
gb.UExpGolombRead(); // anchor_refs_l1
}
}
- for(unsigned int i = 1; i < h.views; i++) {
- for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_non_anchor_refs_l0
+ for (unsigned int i = 1; i < h.views; i++) {
+ for (int j = 0; j < gb.UExpGolombRead(); j++) { // num_non_anchor_refs_l0
gb.UExpGolombRead(); // non_anchor_refs_l0
}
- for(int j = 0; j < gb.UExpGolombRead(); j++) { // num_non_anchor_refs_l1
+ for (int j = 0; j < gb.UExpGolombRead(); j++) { // num_non_anchor_refs_l1
gb.UExpGolombRead(); // non_anchor_refs_l1
}
}
- for(unsigned int i = 0; i <= gb.UExpGolombRead(); i++) { // num_level_values_signalled_minus1
+ for (unsigned int i = 0; i <= gb.UExpGolombRead(); i++) { // num_level_values_signalled_minus1
gb.BitRead(8); // level_idc
- for(int j = 0; j <= gb.UExpGolombRead(); j++) { // num_applicable_ops_minus1
+ for (int j = 0; j <= gb.UExpGolombRead(); j++) { // num_applicable_ops_minus1
gb.BitRead(3); // applicable_op_temporal_id
- for(int k = 0; k <= gb.UExpGolombRead(); k++) { // applicable_op_num_target_views_minus1
+ for (int k = 0; k <= gb.UExpGolombRead(); k++) { // applicable_op_num_target_views_minus1
gb.UExpGolombRead(); // applicable_op_traget_view_id
}
gb.UExpGolombRead(); // applicable_op_num_views_minus1
}
}
- if(gb.BitRead(1)) { // mvc_vui_parameters_present_flag
+ if (gb.BitRead(1)) { // mvc_vui_parameters_present_flag
// mvc_vui_parameters_extension
- for(unsigned int i = 0; i <= gb.UExpGolombRead(); i++) { // vui_mvc_num_ops_minus1
+ for (unsigned int i = 0; i <= gb.UExpGolombRead(); i++) { // vui_mvc_num_ops_minus1
gb.BitRead(3);
- for(unsigned int j = 0; j <= gb.UExpGolombRead(); j++) { // vui_mvc_num_target_output_views_minus1
+ for (unsigned int j = 0; j <= gb.UExpGolombRead(); j++) { // vui_mvc_num_target_output_views_minus1
gb.UExpGolombRead(); // vui_mvc_view_id
}
- if(gb.BitRead(1)) { // vui_mvc_timing_info_present_flag
+ if (gb.BitRead(1)) { // vui_mvc_timing_info_present_flag
gb.BitRead(32); // vui_mvc_num_units_in_tick
gb.BitRead(32); // vui_mvc_time_scale
gb.BitRead(1); // vui_mvc_fixed_frame_rate_flag
}
bool nalflag = gb.BitRead(1); // vui_mvc_nal_hrd_parameters_present_flag
- if(nalflag) {
+ if (nalflag) {
HrdParameters(gb);
}
bool vclflag = gb.BitRead(1); // vui_mvc_vcl_hrd_parameters_present_flag
- if(vclflag) {
+ if (vclflag) {
HrdParameters(gb);
}
- if(nalflag || vclflag) {
+ if (nalflag || vclflag) {
gb.BitRead(1); // vui_mvc_low_delay_hrd_flag
}
gb.BitRead(1); // vui_mvc_pic_struct_present_flag
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp b/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp
index 0ed7cfbad..7f23f45ea 100644
--- a/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp
+++ b/src/filters/parser/MatroskaSplitter/MatroskaFile.cpp
@@ -36,7 +36,7 @@ using namespace MatroskaReader;
CheckPointer(pMN0, E_POINTER); \
\
CAutoPtr<CMatroskaNode> pMN = pMN0->Child(); \
- if(!pMN) return S_FALSE; \
+ if (!pMN) return S_FALSE; \
\
do \
{ \
@@ -46,7 +46,7 @@ using namespace MatroskaReader;
#define EndChunk \
} \
} \
- while(pMN->Next()); \
+ while (pMN->Next()); \
\
return S_OK; \
@@ -1286,38 +1286,38 @@ HRESULT CLength::Parse(CMatroskaNode* pMN)
HRESULT CSignedLength::Parse(CMatroskaNode* pMN)
{
// HRESULT hr = __super::Parse(pMN);
-// if(FAILED(hr)) return hr;
+// if (FAILED(hr)) return hr;
m_val = 0;
BYTE b = 0;
HRESULT hr = pMN->Read(b);
- if(FAILED(hr)) return hr;
+ if (FAILED(hr)) return hr;
int nMoreBytes = 0;
- if((b&0x80) == 0x80) {m_val = b&0x7f; nMoreBytes = 0;}
- else if((b&0xc0) == 0x40) {m_val = b&0x3f; nMoreBytes = 1;}
- else if((b&0xe0) == 0x20) {m_val = b&0x1f; nMoreBytes = 2;}
- else if((b&0xf0) == 0x10) {m_val = b&0x0f; nMoreBytes = 3;}
- else if((b&0xf8) == 0x08) {m_val = b&0x07; nMoreBytes = 4;}
- else if((b&0xfc) == 0x04) {m_val = b&0x03; nMoreBytes = 5;}
- else if((b&0xfe) == 0x02) {m_val = b&0x01; nMoreBytes = 6;}
- else if((b&0xff) == 0x01) {m_val = b&0x00; nMoreBytes = 7;}
+ if ((b&0x80) == 0x80) {m_val = b&0x7f; nMoreBytes = 0;}
+ else if ((b&0xc0) == 0x40) {m_val = b&0x3f; nMoreBytes = 1;}
+ else if ((b&0xe0) == 0x20) {m_val = b&0x1f; nMoreBytes = 2;}
+ else if ((b&0xf0) == 0x10) {m_val = b&0x0f; nMoreBytes = 3;}
+ else if ((b&0xf8) == 0x08) {m_val = b&0x07; nMoreBytes = 4;}
+ else if ((b&0xfc) == 0x04) {m_val = b&0x03; nMoreBytes = 5;}
+ else if ((b&0xfe) == 0x02) {m_val = b&0x01; nMoreBytes = 6;}
+ else if ((b&0xff) == 0x01) {m_val = b&0x00; nMoreBytes = 7;}
else return E_FAIL;
//int nMoreBytesTmp = nMoreBytes;
MatroskaReader::QWORD UnknownSize = (1i64<<(7*(nMoreBytes+1)))-1;
- while(nMoreBytes-- > 0)
+ while (nMoreBytes-- > 0)
{
m_val <<= 8;
hr = pMN->Read(*(BYTE*)&m_val);
- if(FAILED(hr)) return hr;
+ if (FAILED(hr)) return hr;
}
- if(m_val == UnknownSize)
+ if (m_val == UnknownSize)
{
m_val = pMN->GetLength() - pMN->GetPos();
TRACE(_T("CLength: Unspecified chunk size at %I64d (corrected to %I64d)\n"), pMN->GetPos(), m_val);
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
index e3f59ec32..c0e02efdc 100644
--- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
+++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
@@ -881,13 +881,13 @@ avcsuccess:
/*
#ifdef _DEBUG
- for(int i = 1, j = GetChapterCount(CHAPTER_ROOT_ID); i <= j; i++)
+ for (int i = 1, j = GetChapterCount(CHAPTER_ROOT_ID); i <= j; i++)
{
UINT id = GetChapterId(CHAPTER_ROOT_ID, i);
struct ChapterElement ce;
BOOL b = GetChapterInfo(id, &ce);
BSTR bstr = GetChapterStringInfo(id, "eng", "");
- if(bstr) ::SysFreeString(bstr);
+ if (bstr) ::SysFreeString(bstr);
}
#endif
*/
@@ -1167,7 +1167,7 @@ void CMatroskaSplitterFilter::DemuxSeek(REFERENCE_TIME rt)
bool fFoundKeyFrame = false;
/*
- if(pCueTrackPositions->CueBlockNumber > 0)
+ if (pCueTrackPositions->CueBlockNumber > 0)
{
// TODO: CueBlockNumber only tells the block num of the track and not for all mixed in the cluster
m_nLastBlock = (int)pCueTrackPositions->CueBlockNumber;
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.cpp b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
index 74c0ca814..fad7fefb1 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.cpp
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
@@ -1628,7 +1628,7 @@ HRESULT CMpegSplitterOutputPin::DeliverEndFlush()
return __super::DeliverEndFlush();
}
-#define MOVE_TO_H264_START_CODE(b, e) while(b <= e-4 && !((*(DWORD *)b == 0x01000000) || ((*(DWORD *)b & 0x00FFFFFF) == 0x00010000))) b++; if((b <= e-4) && *(DWORD *)b == 0x01000000) b++;
+#define MOVE_TO_H264_START_CODE(b, e) while (b <= e-4 && !((*(DWORD *)b == 0x01000000) || ((*(DWORD *)b & 0x00FFFFFF) == 0x00010000))) b++; if ((b <= e-4) && *(DWORD *)b == 0x01000000) b++;
HRESULT CMpegSplitterOutputPin::DeliverPacket(CAutoPtr<Packet> p)
{
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.h b/src/filters/parser/MpegSplitter/MpegSplitter.h
index 8fff51f6b..db1cd2e6f 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.h
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.h
@@ -34,20 +34,20 @@
#define PauseGraph \
CComQIPtr<IMediaControl> _pMC(m_pGraph); \
OAFilterState _fs = -1; \
- if(_pMC) _pMC->GetState(1000, &_fs); \
- if(_fs == State_Running) \
+ if (_pMC) _pMC->GetState(1000, &_fs); \
+ if (_fs == State_Running) \
_pMC->Pause(); \
\
HRESULT _hr = E_FAIL; \
CComQIPtr<IMediaSeeking> _pMS((IUnknown*)(INonDelegatingUnknown*)m_pGraph); \
LONGLONG _rtNow = 0; \
- if(_pMS) _hr = _pMS->GetCurrentPosition(&_rtNow); \
+ if (_pMS) _hr = _pMS->GetCurrentPosition(&_rtNow); \
#define ResumeGraph \
- if(SUCCEEDED(_hr) && _pMS && _fs != State_Stopped) \
+ if (SUCCEEDED(_hr) && _pMS && _fs != State_Stopped) \
_hr = _pMS->SetPositions(&_rtNow, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); \
\
- if(_fs == State_Running && _pMS) \
+ if (_fs == State_Running && _pMS) \
_pMC->Run(); \
class __declspec(uuid("DC257063-045F-4BE2-BD5B-E12279C464F0"))
diff --git a/src/filters/parser/OggSplitter/OggSplitter.cpp b/src/filters/parser/OggSplitter/OggSplitter.cpp
index 58271dbfa..d56e555ef 100644
--- a/src/filters/parser/OggSplitter/OggSplitter.cpp
+++ b/src/filters/parser/OggSplitter/OggSplitter.cpp
@@ -729,7 +729,7 @@ HRESULT COggSplitterOutputPin::UnpackPage(OggPage& page)
p->TrackNumber = page.m_hdr.bitstream_serial_number;
if (S_OK == UnpackPacket(p, pData + i, j-i)) {
- //if(p->TrackNumber == 1)
+ //if (p->TrackNumber == 1)
//TRACE(_T("[%d]: %d, %I64d -> %I64d (skip=%d, disc=%d, sync=%d)\n"),
// (int)p->TrackNumber, p->GetCount(), p->rtStart, p->rtStop,
// (int)m_fSkip, (int)p->bDiscontinuity, (int)p->bSyncPoint);
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
index 1ce925aec..201717431 100644
--- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
+++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
@@ -650,7 +650,7 @@ void CRealMediaSplitterFilter::DemuxSeek(REFERENCE_TIME rt)
// search the closest keyframe to the seek time (commented out 'cause rm seems to index all of its keyframes...)
/*
- if(m_seekpos)
+ if (m_seekpos)
{
DataChunk* pdc = m_pFile->m_dcs.GetAt(m_seekpos);
@@ -659,21 +659,21 @@ void CRealMediaSplitterFilter::DemuxSeek(REFERENCE_TIME rt)
REFERENCE_TIME seektime = -1;
UINT32 seekstream = -1;
- for(UINT32 i = m_seekpacket; i < pdc->nPackets; i++)
+ for (UINT32 i = m_seekpacket; i < pdc->nPackets; i++)
{
UINT64 filepos = m_pFile->GetPos();
MediaPacketHeader mph;
- if(S_OK != m_pFile->Read(mph, false))
+ if (S_OK != m_pFile->Read(mph, false))
break;
- if(seekstream == -1) seekstream = mph.stream;
- if(seekstream != mph.stream) continue;
+ if (seekstream == -1) seekstream = mph.stream;
+ if (seekstream != mph.stream) continue;
- if(seektime == 10000i64*mph.tStart) continue;
- if(rt < 10000i64*mph.tStart) break;
+ if (seektime == 10000i64*mph.tStart) continue;
+ if (rt < 10000i64*mph.tStart) break;
- if((mph.flags&MediaPacketHeader::PN_KEYFRAME_FLAG))
+ if ((mph.flags&MediaPacketHeader::PN_KEYFRAME_FLAG))
{
m_seekpacket = i;
m_seekfilepos = filepos;
@@ -2243,7 +2243,7 @@ HRESULT CRealAudioDecoder::Receive(IMediaSample* pIn)
REFERENCE_TIME rtStart, rtStop;
pIn->GetTime(&rtStart, &rtStop);
/*
- if(pIn->IsPreroll() == S_OK || rtStart < 0)
+ if (pIn->IsPreroll() == S_OK || rtStart < 0)
return S_OK;
*/