diff options
Diffstat (limited to 'src')
28 files changed, 257 insertions, 269 deletions
diff --git a/src/DSUtil/DSUtil.cpp b/src/DSUtil/DSUtil.cpp index efe07df42..23678486b 100644 --- a/src/DSUtil/DSUtil.cpp +++ b/src/DSUtil/DSUtil.cpp @@ -1162,13 +1162,13 @@ IBaseFilter* AppendFilter(IPin* pPin, IMoniker* pMoniker, IGraphBuilder* pGB) break;
}
- BeginEnumPins(pBF, pEP, pPinTo) {
+ BeginEnumPins(pBF, pEP, pPinTo2) {
PIN_DIRECTION dir2;
- if (FAILED(pPinTo->QueryDirection(&dir2)) || dir2 != PINDIR_INPUT) {
+ if (FAILED(pPinTo2->QueryDirection(&dir2)) || dir2 != PINDIR_INPUT) {
continue;
}
- if (SUCCEEDED(pGB->ConnectDirect(pPin, pPinTo, nullptr))) {
+ if (SUCCEEDED(pGB->ConnectDirect(pPin, pPinTo2, nullptr))) {
return pBF;
}
}
diff --git a/src/DSUtil/MediaTypeEx.cpp b/src/DSUtil/MediaTypeEx.cpp index 6fa348df7..36fd7df39 100644 --- a/src/DSUtil/MediaTypeEx.cpp +++ b/src/DSUtil/MediaTypeEx.cpp @@ -631,36 +631,36 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl) if (wfe.wFormatTag == WAVE_FORMAT_EXTENSIBLE && wfe.cbSize == sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)) {
fmtsize = sizeof(WAVEFORMATEXTENSIBLE);
- WAVEFORMATEXTENSIBLE& wfe = *(WAVEFORMATEXTENSIBLE*)pbFormat;
+ WAVEFORMATEXTENSIBLE& wfextensible = *(WAVEFORMATEXTENSIBLE*)pbFormat;
sl.AddTail(_T("WAVEFORMATEXTENSIBLE:"));
- if (wfe.Format.wBitsPerSample != 0) {
- str.Format(_T("wValidBitsPerSample: %u"), wfe.Samples.wValidBitsPerSample);
+ if (wfextensible.Format.wBitsPerSample != 0) {
+ str.Format(_T("wValidBitsPerSample: %u"), wfextensible.Samples.wValidBitsPerSample);
} else {
- str.Format(_T("wSamplesPerBlock: %u"), wfe.Samples.wSamplesPerBlock);
+ str.Format(_T("wSamplesPerBlock: %u"), wfextensible.Samples.wSamplesPerBlock);
}
sl.AddTail(str);
- str.Format(_T("dwChannelMask: 0x%08x"), wfe.dwChannelMask);
+ str.Format(_T("dwChannelMask: 0x%08x"), wfextensible.dwChannelMask);
sl.AddTail(str);
- str.Format(_T("SubFormat: %s"), CStringFromGUID(wfe.SubFormat));
+ str.Format(_T("SubFormat: %s"), CStringFromGUID(wfextensible.SubFormat));
sl.AddTail(str);
sl.AddTail(_T(""));
} else if (wfe.wFormatTag == WAVE_FORMAT_DOLBY_AC3 && wfe.cbSize == sizeof(DOLBYAC3WAVEFORMAT) - sizeof(WAVEFORMATEX)) {
fmtsize = sizeof(DOLBYAC3WAVEFORMAT);
- DOLBYAC3WAVEFORMAT& wfe = *(DOLBYAC3WAVEFORMAT*)pbFormat;
+ DOLBYAC3WAVEFORMAT& dawf = *(DOLBYAC3WAVEFORMAT*)pbFormat;
sl.AddTail(_T("DOLBYAC3WAVEFORMAT:"));
- str.Format(_T("bBigEndian: %u"), wfe.bBigEndian);
+ str.Format(_T("bBigEndian: %u"), dawf.bBigEndian);
sl.AddTail(str);
- str.Format(_T("bsid: %u"), wfe.bsid);
+ str.Format(_T("bsid: %u"), dawf.bsid);
sl.AddTail(str);
- str.Format(_T("lfeon: %u"), wfe.lfeon);
+ str.Format(_T("lfeon: %u"), dawf.lfeon);
sl.AddTail(str);
- str.Format(_T("copyrightb: %u"), wfe.copyrightb);
+ str.Format(_T("copyrightb: %u"), dawf.copyrightb);
sl.AddTail(str);
- str.Format(_T("nAuxBitsCode: %u"), wfe.nAuxBitsCode);
+ str.Format(_T("nAuxBitsCode: %u"), dawf.nAuxBitsCode);
sl.AddTail(str);
sl.AddTail(_T(""));
diff --git a/src/SubPic/SubPicQueueImpl.cpp b/src/SubPic/SubPicQueueImpl.cpp index f5d7abc22..87d880554 100644 --- a/src/SubPic/SubPicQueueImpl.cpp +++ b/src/SubPic/SubPicQueueImpl.cpp @@ -223,7 +223,7 @@ STDMETHODIMP CSubPicQueue::SetTime(REFERENCE_TIME rtNow) STDMETHODIMP CSubPicQueue::Invalidate(REFERENCE_TIME rtInvalidate /*= -1*/)
{
- std::unique_lock<std::mutex> lock(m_mutexQueue);
+ std::unique_lock<std::mutex> lockQueue(m_mutexQueue);
#if SUBPIC_TRACE_LEVEL > 0
TRACE(_T("Invalidate: %f\n"), double(rtInvalidate) / 10000000.0);
@@ -234,7 +234,7 @@ STDMETHODIMP CSubPicQueue::Invalidate(REFERENCE_TIME rtInvalidate /*= -1*/) m_rtNowLast = LONGLONG_ERROR;
{
- std::lock_guard<std::mutex> lock(m_mutexSubpic);
+ std::lock_guard<std::mutex> lockSubpic(m_mutexSubpic);
if (m_pSubPic && m_pSubPic->GetStop() > rtInvalidate) {
m_pSubPic.Release();
}
@@ -256,7 +256,7 @@ STDMETHODIMP CSubPicQueue::Invalidate(REFERENCE_TIME rtInvalidate /*= -1*/) m_rtNow = rtInvalidate;
}
- lock.unlock();
+ lockQueue.unlock();
m_condQueueFull.notify_one();
m_runQueueEvent.Set();
diff --git a/src/Subtitles/ColorConvTable.cpp b/src/Subtitles/ColorConvTable.cpp index 092d91e17..245fafdac 100644 --- a/src/Subtitles/ColorConvTable.cpp +++ b/src/Subtitles/ColorConvTable.cpp @@ -723,7 +723,6 @@ DWORD ColorConvTable::A8Y8U8V8_To_ARGB_PC_BT709(int a8, int y8, int u8, int v8) DWORD ColorConvTable::A8Y8U8V8_PC_To_TV(int a8, int y8, int u8, int v8) { - const int FRACTION_SCALE = 1 << 16; const int YUV_MIN = 16; const int cy = int(219.0 / 255 * FRACTION_SCALE + 0.5); const int cuv = int(224.0 / 255 * FRACTION_SCALE + 0.5); @@ -735,7 +734,6 @@ DWORD ColorConvTable::A8Y8U8V8_PC_To_TV(int a8, int y8, int u8, int v8) DWORD ColorConvTable::A8Y8U8V8_TV_To_PC(int a8, int y8, int u8, int v8) { - const int FRACTION_SCALE = 1 << 16; const int YUV_MIN = 16; const int cy = int(255 / 219.0 * FRACTION_SCALE + 0.5); const int cuv = int(255 / 224.0 * FRACTION_SCALE + 0.5); diff --git a/src/Subtitles/RTS.cpp b/src/Subtitles/RTS.cpp index 8796bc80f..ecce8ec72 100644 --- a/src/Subtitles/RTS.cpp +++ b/src/Subtitles/RTS.cpp @@ -1971,8 +1971,8 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s tag.paramsInt.Add(wcstol(tag.params[0], nullptr, 10));
tag.params.RemoveAt(0);
} else if (nParams == 4) {
- for (size_t i = 0; i < nParams; i++) {
- tag.paramsInt.Add(wcstol(tag.params[i], nullptr, 10));
+ for (size_t n = 0; n < nParams; n++) {
+ tag.paramsInt.Add(wcstol(tag.params[n], nullptr, 10));
}
tag.params.RemoveAll();
}
@@ -1981,8 +1981,8 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s case SSA_fade: {
size_t nParams = tag.params.GetCount();
if (nParams == 7 || nParams == 2) {
- for (size_t i = 0; i < nParams; i++) {
- tag.paramsInt.Add(wcstol(tag.params[i], nullptr, 10));
+ for (size_t n = 0; n < nParams; n++) {
+ tag.paramsInt.Add(wcstol(tag.params[n], nullptr, 10));
}
tag.params.RemoveAll();
}
@@ -1991,11 +1991,11 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s case SSA_move: {
size_t nParams = tag.params.GetCount();
if (nParams == 4 || nParams == 6) {
- for (size_t i = 0; i < 4; i++) {
- tag.paramsReal.Add(wcstod(tag.params[i], nullptr));
+ for (size_t n = 0; n < 4; n++) {
+ tag.paramsReal.Add(wcstod(tag.params[n], nullptr));
}
- for (size_t i = 4; i < nParams; i++) {
- tag.paramsInt.Add(wcstol(tag.params[i], nullptr, 10));
+ for (size_t n = 4; n < nParams; n++) {
+ tag.paramsInt.Add(wcstol(tag.params[n], nullptr, 10));
}
tag.params.RemoveAll();
}
@@ -2005,8 +2005,8 @@ bool CRenderedTextSubtitle::ParseSSATag(SSATagsList& tagsList, const CStringW& s case SSA_pos: {
size_t nParams = tag.params.GetCount();
if (nParams == 2) {
- for (size_t i = 0; i < nParams; i++) {
- tag.paramsReal.Add(wcstod(tag.params[i], nullptr));
+ for (size_t n = 0; n < nParams; n++) {
+ tag.paramsReal.Add(wcstod(tag.params[n], nullptr));
}
tag.params.RemoveAll();
}
@@ -2924,10 +2924,10 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d Init(CSize(spd.w, spd.h), spd.vidrect);
}
- int t = (int)(rt / 10000);
+ int time = (int)(rt / 10000);
int segment;
- const STSSegment* stss = SearchSubs(t, fps, &segment);
+ const STSSegment* stss = SearchSubs(time, fps, &segment);
if (!stss) {
return S_FALSE;
}
@@ -2941,7 +2941,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d m_subtitleCache.GetNextAssoc(pos, entry, pSub);
STSEntry& stse = GetAt(entry);
- if (stse.end < t) {
+ if (stse.end < time) {
delete pSub;
m_subtitleCache.RemoveKey(entry);
}
@@ -2969,7 +2969,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d {
int start = TranslateStart(entry, fps);
- m_time = t - start;
+ m_time = time - start;
m_delay = TranslateEnd(entry, fps) - start;
}
@@ -3006,9 +3006,7 @@ STDMETHODIMP CRenderedTextSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, d int t2 = s->m_effects[k]->t[1];
if (t2 < t1) {
- int t = t1;
- t1 = t2;
- t2 = t;
+ std::swap(t1, t2);
}
if (t1 <= 0 && t2 <= 0) {
diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp index 11a7d9b4a..701a51535 100644 --- a/src/Subtitles/STS.cpp +++ b/src/Subtitles/STS.cpp @@ -509,7 +509,6 @@ static bool OpenSubRipper(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet }
int num2;
- WCHAR wc;
if (swscanf_s(tmp, L"%d%c", &num2, &wc, 1) == 1 && bFoundEmpty) {
num = num2;
break;
@@ -2763,17 +2762,15 @@ bool CSimpleTextSubtitle::SaveAs(CString fn, Subtitle::SubType type, if (type == Subtitle::ASS && m_fScaledBAS) {
str += _T("ScaledBorderAndShadow: Yes\n");
}
- str += _T("PlayResX: %d\n");
- str += _T("PlayResY: %d\n");
+ str.AppendFormat(_T("PlayResX: %d\n"), m_dstScreenSize.cx);
+ str.AppendFormat(_T("PlayResY: %d\n"), m_dstScreenSize.cy);
str += _T("Timer: 100.0000\n");
str += _T("\n");
str += (type == Subtitle::SSA)
? _T("[V4 Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding\n")
: _T("[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\n");
- CString str2;
- str2.Format(str, m_dstScreenSize.cx, m_dstScreenSize.cy);
- f.WriteString(str2);
+ f.WriteString(str);
str = (type == Subtitle::SSA)
? _T("Style: %s,%s,%d,&H%06x,&H%06x,&H%06x,&H%06x,%d,%d,%d,%.2f,%.2f,%d,%d,%d,%d,%d,%d\n")
diff --git a/src/Subtitles/SubtitleHelpers.cpp b/src/Subtitles/SubtitleHelpers.cpp index 8dcea6ad3..c44567675 100644 --- a/src/Subtitles/SubtitleHelpers.cpp +++ b/src/Subtitles/SubtitleHelpers.cpp @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2014 see Authors.txt + * (C) 2006-2015 see Authors.txt * * This file is part of MPC-HC. * @@ -109,12 +109,12 @@ void Subtitle::GetSubFileNames(CString fn, const CAtlArray<CString>& paths, CAtl HANDLE hFile = FindFirstFile(path + title + _T("*"), &wfd); if (hFile != INVALID_HANDLE_VALUE) { do { - CString fn = path + wfd.cFileName; + CString fn2 = path + wfd.cFileName; if (std::regex_match(&wfd.cFileName[titleLength], reSub)) { - subs.AddTail(fn); + subs.AddTail(fn2); } else if (std::regex_match(&wfd.cFileName[titleLength], reVid)) { // Convert to lower-case and cut the extension for easier matching - vids.AddTail(fn.Left(fn.ReverseFind(_T('.'))).MakeLower()); + vids.AddTail(fn2.Left(fn2.ReverseFind(_T('.'))).MakeLower()); } } while (FindNextFile(hFile, &wfd)); @@ -123,8 +123,8 @@ void Subtitle::GetSubFileNames(CString fn, const CAtlArray<CString>& paths, CAtl POSITION posSub = subs.GetHeadPosition(); while (posSub) { - CString& fn = subs.GetNext(posSub); - CString fnlower = fn; + CString& fn2 = subs.GetNext(posSub); + CString fnlower = fn2; fnlower.MakeLower(); // Check if there is an exact match for another video file @@ -139,7 +139,7 @@ void Subtitle::GetSubFileNames(CString fn, const CAtlArray<CString>& paths, CAtl if (!bMatchAnotherVid) { SubFile f; - f.fn = fn; + f.fn = fn2; ret.Add(f); } } diff --git a/src/Subtitles/USFSubtitles.cpp b/src/Subtitles/USFSubtitles.cpp index 737dad5e0..dedd644c1 100644 --- a/src/Subtitles/USFSubtitles.cpp +++ b/src/Subtitles/USFSubtitles.cpp @@ -458,9 +458,9 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode) // metadata
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"metadata") {
+ if (childName == L"metadata") {
ParseMetadata(pChild, metadata);
}
}
@@ -469,13 +469,13 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode) // styles
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"styles") {
+ if (childName == L"styles") {
BeginEnumChildren(pChild, pGrandChild) { // :)
- DeclareNameAndValue(pGrandChild, name, val);
+ DeclareNameAndValue(pGrandChild, grandChildName, grandChildVal);
- if (name == L"style") {
+ if (grandChildName == L"style") {
CAutoPtr<style_t> s(DEBUG_NEW style_t);
if (s) {
ParseStyle(pGrandChild, s);
@@ -491,13 +491,13 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode) // effects
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"effects") {
+ if (childName == L"effects") {
BeginEnumChildren(pChild, pGrandChild) { // :)
- DeclareNameAndValue(pGrandChild, name, val);
+ DeclareNameAndValue(pGrandChild, grandChildName, grandChildVal);
- if (name == L"effect") {
+ if (grandChildName == L"effect") {
CAutoPtr<effect_t> e(DEBUG_NEW effect_t);
if (e) {
ParseEffect(pGrandChild, e);
@@ -513,13 +513,13 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode) // subtitles
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"subtitles") {
+ if (childName == L"subtitles") {
BeginEnumChildren(pChild, pGrandChild) { // :)
- DeclareNameAndValue(pGrandChild, name, val);
+ DeclareNameAndValue(pGrandChild, grandChildName, grandChildVal);
- if (name == L"subtitle") {
+ if (grandChildName == L"subtitle") {
CStringW sstart = GetAttrib(L"start", pGrandChild);
CStringW sstop = GetAttrib(L"stop", pGrandChild);
CStringW sduration = GetAttrib(L"duration", pGrandChild);
@@ -563,13 +563,13 @@ void CUSFSubtitles::ParseMetadata(CComPtr<IXMLDOMNode> pNode, metadata_t& m) m.comment = GetText(pNode);
} else if (name == L"author") {
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"name") {
+ if (childName == L"name") {
m.author.name = GetText(pChild);
- } else if (name == L"email") {
+ } else if (childName == L"email") {
m.author.email = GetText(pChild);
- } else if (name == L"url") {
+ } else if (childName == L"url") {
m.author.url = GetText(pChild);
}
}
@@ -646,9 +646,9 @@ void CUSFSubtitles::ParseEffect(CComPtr<IXMLDOMNode> pNode, effect_t* e) e->name = GetAttrib(L"name", pNode);
} else if (name == L"keyframes") {
BeginEnumChildren(pNode, pChild) {
- DeclareNameAndValue(pChild, name, val);
+ DeclareNameAndValue(pChild, childName, childVal);
- if (name == L"keyframe") {
+ if (childName == L"keyframe") {
CAutoPtr<keyframe_t> k(DEBUG_NEW keyframe_t);
if (k) {
ParseKeyframe(pChild, k);
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp index c5be29d31..c9c2de091 100644 --- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp +++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp @@ -546,12 +546,12 @@ DWORD CMatroskaMuxerFilter::ThreadProc() if (!fTracksWritten) {
CNode<Track> Tracks;
CAutoPtr<Track> pT(DEBUG_NEW Track());
- POSITION pos = pActivePins.GetHeadPosition();
+ pos = pActivePins.GetHeadPosition();
for (int i = 1; pos; i++) {
- CMatroskaMuxerInputPin* pPin = pActivePins.GetNext(pos);
+ CMatroskaMuxerInputPin* pActivePin = pActivePins.GetNext(pos);
CAutoPtr<TrackEntry> pTE(DEBUG_NEW TrackEntry());
- *pTE = *pPin->GetTrackEntry();
+ *pTE = *pActivePin->GetTrackEntry();
if (TrackNumber == 0 && pTE->TrackType == TrackEntry::TypeVideo) {
TrackNumber = pTE->TrackNumber;
}
@@ -1228,7 +1228,7 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample) return hr;
}
- long len = pSample->GetActualDataLength();
+ long inputLen = pSample->GetActualDataLength();
REFERENCE_TIME rtStart = -1, rtStop = -1;
hr = pSample->GetTime(&rtStart, &rtStop);
@@ -1245,15 +1245,15 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample) TRACE(_T("Received (%u): %I64d-%I64d (c=%d, co=%dms), len=%ld, d%d p%d s%d\n"),
(static_cast<CMatroskaMuxerFilter*>(m_pFilter))->GetTrackNumber(this),
rtStart, rtStop, (int)((rtStart / 10000) / MAXCLUSTERTIME), (int)((rtStart / 10000) % MAXCLUSTERTIME),
- len,
+ inputLen,
pSample->IsDiscontinuity() == S_OK ? 1 : 0,
pSample->IsPreroll() == S_OK ? 1 : 0,
pSample->IsSyncPoint() == S_OK ? 1 : 0);
if (m_mt.subtype == MEDIASUBTYPE_Vorbis && m_pVorbisHdrs.GetCount() < 3) {
CAutoPtr<CBinary> data(DEBUG_NEW CBinary(0));
- data->SetCount(len);
- memcpy(data->GetData(), pData, len);
+ data->SetCount(inputLen);
+ memcpy(data->GetData(), pData, inputLen);
m_pVorbisHdrs.Add(data);
if (m_pVorbisHdrs.GetCount() == 3) {
@@ -1270,8 +1270,8 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample) *dst++ = 2;
for (size_t i = 0; i < 2; i++) {
- for (INT_PTR len = m_pVorbisHdrs[i]->GetCount(); len >= 0; len -= 255) {
- *dst++ = (BYTE)std::min<INT_PTR>(len, 255);
+ for (INT_PTR len2 = m_pVorbisHdrs[i]->GetCount(); len2 >= 0; len2 -= 255) {
+ *dst++ = (BYTE)std::min<INT_PTR>(len2, 255);
}
}
@@ -1315,8 +1315,8 @@ STDMETHODIMP CMatroskaMuxerInputPin::Receive(IMediaSample* pSample) }
CAutoPtr<CBinary> data(DEBUG_NEW CBinary(0));
- data->SetCount(len);
- memcpy(data->GetData(), pData, len);
+ data->SetCount(inputLen);
+ memcpy(data->GetData(), pData, inputLen);
b->Block.BlockData.AddTail(data);
CAutoLock cAutoLock2(&m_csQueue);
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp index a16b45bd4..2e29e37c1 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -1095,9 +1095,9 @@ bool CBaseSplitterFilter::IsAnyPinDrying() // 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();
- while (pos) {
- m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
+ POSITION pos2 = m_pOutputs.GetHeadPosition();
+ while (pos2) {
+ m_pOutputs.GetNext(pos2)->SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
}
m_priority = THREAD_PRIORITY_BELOW_NORMAL;
}
@@ -1109,9 +1109,9 @@ bool CBaseSplitterFilter::IsAnyPinDrying() if (m_priority != THREAD_PRIORITY_NORMAL && (totalcount > m_QueueMaxPackets * 2 / 3 || totalsize > MAXPACKETSIZE * 2 / 3)) {
// SetThreadPriority(m_hThread, m_priority = THREAD_PRIORITY_NORMAL);
- POSITION pos = m_pOutputs.GetHeadPosition();
- while (pos) {
- m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_NORMAL);
+ POSITION pos2 = m_pOutputs.GetHeadPosition();
+ while (pos2) {
+ m_pOutputs.GetNext(pos2)->SetThreadPriority(THREAD_PRIORITY_NORMAL);
}
m_priority = THREAD_PRIORITY_NORMAL;
}
diff --git a/src/filters/reader/CDXAReader/CDXAReader.cpp b/src/filters/reader/CDXAReader/CDXAReader.cpp index b27bc189f..9d111ab9c 100644 --- a/src/filters/reader/CDXAReader/CDXAReader.cpp +++ b/src/filters/reader/CDXAReader/CDXAReader.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -475,8 +475,8 @@ bool CCDXAStream::LookForMediaSubType() _stprintf_s(number, _countof(number), _T("%d"), j);
TCHAR pattern[256 + 1];
- ULONG len = 256;
- if (ERROR_SUCCESS != subkey.QueryStringValue(number, pattern, &len)) {
+ ULONG lenValue = 256;
+ if (ERROR_SUCCESS != subkey.QueryStringValue(number, pattern, &lenValue)) {
break;
}
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp index 8dbca9f5f..ff211fcbd 100644 --- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp @@ -1120,7 +1120,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
- int ScanLineDiff = long(ScanLine) - _RasterStart;
+ ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
@@ -1182,7 +1182,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
- int ScanLineDiff = long(ScanLine) - _RasterStart;
+ ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
@@ -1196,7 +1196,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi bWaited = true;
- int ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
+ ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
if (ScanLineDiffLock > m_ScreenSize.cy / 2) {
ScanLineDiffLock -= m_ScreenSize.cy;
} else if (ScanLineDiffLock < -m_ScreenSize.cy / 2) {
@@ -1213,7 +1213,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi LastLineDiffLock = ScanLineDiffLock;
- int ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
+ ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
if (ScanLineDiffSleep > m_ScreenSize.cy / 2) {
ScanLineDiffSleep -= m_ScreenSize.cy;
} else if (ScanLineDiffSleep < -m_ScreenSize.cy / 2) {
@@ -1449,19 +1449,18 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll) bool bDoVSyncInPresent = (!bCompositionEnabled && !m_bAlternativeVSync) || !r.m_AdvRendSets.bVMR9VSync;
- CComPtr<IDirect3DQuery9> pEventQuery;
-
- m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
- if (pEventQuery) {
- pEventQuery->Issue(D3DISSUE_END);
+ CComPtr<IDirect3DQuery9> pEventQueryFlushBeforeVSync;
+ m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQueryFlushBeforeVSync);
+ if (pEventQueryFlushBeforeVSync) {
+ pEventQueryFlushBeforeVSync->Issue(D3DISSUE_END);
}
- if (r.m_AdvRendSets.bVMRFlushGPUBeforeVSync && pEventQuery) {
+ if (r.m_AdvRendSets.bVMRFlushGPUBeforeVSync && pEventQueryFlushBeforeVSync) {
LONGLONG llPerf = rd->GetPerfCounter();
BOOL Data;
//Sleep(5);
LONGLONG FlushStartTime = rd->GetPerfCounter();
- while (S_FALSE == pEventQuery->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
+ while (S_FALSE == pEventQueryFlushBeforeVSync->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
if (!r.m_AdvRendSets.bVMRFlushGPUWait) {
break;
}
@@ -1504,8 +1503,8 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll) // Create a query object
{
- CComPtr<IDirect3DQuery9> pEventQuery;
- m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
+ CComPtr<IDirect3DQuery9> pEventQueryFlushAfterVSync;
+ m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQueryFlushAfterVSync);
LONGLONG llPerf = rd->GetPerfCounter();
CRect presentationSrcRect(rDstPri), presentationDestRect(m_windowRect);
@@ -1526,15 +1525,15 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll) }
}
// Issue an End event
- if (pEventQuery) {
- pEventQuery->Issue(D3DISSUE_END);
+ if (pEventQueryFlushAfterVSync) {
+ pEventQueryFlushAfterVSync->Issue(D3DISSUE_END);
}
BOOL Data;
- if (r.m_AdvRendSets.bVMRFlushGPUAfterPresent && pEventQuery) {
+ if (r.m_AdvRendSets.bVMRFlushGPUAfterPresent && pEventQueryFlushAfterVSync) {
LONGLONG FlushStartTime = rd->GetPerfCounter();
- while (S_FALSE == pEventQuery->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
+ while (S_FALSE == pEventQueryFlushAfterVSync->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
if (!r.m_AdvRendSets.bVMRFlushGPUWait) {
break;
}
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp index 923a2f8f8..174e1d314 100644 --- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp @@ -2059,8 +2059,8 @@ void CEVRAllocatorPresenter::RenderThread() //if (WaitForMultipleObjects (_countof(hEvtsBuff), hEvtsBuff, FALSE, INFINITE) == WAIT_OBJECT_0+2)
{
CComPtr<IMFSample> pMFSample;
- LONGLONG llPerf = GetRenderersData()->GetPerfCounter();
- UNREFERENCED_PARAMETER(llPerf);
+ //LONGLONG llPerf2 = GetRenderersData()->GetPerfCounter();
+ //UNREFERENCED_PARAMETER(llPerf2);
int nSamplesLeft = 0;
if (SUCCEEDED(GetScheduledSample(&pMFSample, nSamplesLeft))) {
//UINT32 nSurface;
@@ -2648,7 +2648,7 @@ void CEVRAllocatorPresenter::AddToScheduledList(IMFSample* pSample, bool bSorted }
if (Diff < m_rtTimePerFrame * 8 && m_rtTimePerFrame && Diff2 < m_rtTimePerFrame * 8) { // Detect seeking
int iPos = (m_DetectedFrameTimePos++) % 60;
- LONGLONG Diff = Time - PrevTime;
+ Diff = Time - PrevTime;
if (PrevTime == -1) {
Diff = 0;
}
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp index 93d8ca493..946d890f2 100644 --- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp +++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp @@ -1706,7 +1706,7 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll) hr = m_pD3DDev->SetPixelShaderConstantF(0, (float*)fConstData, _countof(fConstData));
- int src = 1, dst = 0;
+ int srcTexture = 1, dstTexture = 0;
POSITION pos = m_pPixelShadersScreenSpace.GetHeadPosition();
while (pos) {
@@ -1714,7 +1714,7 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll) m_pD3DDev->SetRenderTarget(0, pBackBuffer);
} else {
CComPtr<IDirect3DSurface9> pRT;
- hr = m_pScreenSizeTemporaryTexture[dst]->GetSurfaceLevel(0, &pRT);
+ hr = m_pScreenSizeTemporaryTexture[dstTexture]->GetSurfaceLevel(0, &pRT);
m_pD3DDev->SetRenderTarget(0, pRT);
}
@@ -1723,9 +1723,9 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll) Shader.Compile(m_pPSC);
}
hr = m_pD3DDev->SetPixelShader(Shader.m_pPixelShader);
- TextureCopy(m_pScreenSizeTemporaryTexture[src]);
+ TextureCopy(m_pScreenSizeTemporaryTexture[srcTexture]);
- std::swap(src, dst);
+ std::swap(srcTexture, dstTexture);
}
hr = m_pD3DDev->SetPixelShader(nullptr);
diff --git a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp index 03dc69479..a267f45c2 100644 --- a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp +++ b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -1301,12 +1301,12 @@ HRESULT CStreamSwitcherFilter::CompleteConnect(PIN_DIRECTION dir, CBasePin* pPin name.Format(L"Channel %ld", ++m_PinVersion);
HRESULT hr = S_OK;
- CStreamSwitcherInputPin* pPin = DEBUG_NEW CStreamSwitcherInputPin(this, &hr, name);
- if (!pPin || FAILED(hr)) {
- delete pPin;
+ CStreamSwitcherInputPin* pInputPin = DEBUG_NEW CStreamSwitcherInputPin(this, &hr, name);
+ if (!pInputPin || FAILED(hr)) {
+ delete pInputPin;
return E_FAIL;
}
- m_pInputs.AddTail(pPin);
+ m_pInputs.AddTail(pInputPin);
}
}
diff --git a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp index 7bd077e9e..513199edd 100644 --- a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp +++ b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -144,34 +144,34 @@ HRESULT CAVI2AC3Filter::Transform(IMediaSample* pSample, IMediaSample* pOutSampl int curlen = std::min(len - pos, 2013l);
pos += 2013;
- CComPtr<IMediaSample> pOutSample;
- hr = InitializeOutputSample(pSample, &pOutSample);
+ CComPtr<IMediaSample> pNewOutSample;
+ hr = InitializeOutputSample(pSample, &pNewOutSample);
if (fDiscontinuity) {
if (fHasTime) {
rtStop = rtStart + (rtStop - rtStart) * curlen / len;
- pOutSample->SetTime(&rtStart, &rtStop);
+ pNewOutSample->SetTime(&rtStart, &rtStop);
}
fDiscontinuity = false;
} else {
- pOutSample->SetTime(nullptr, nullptr);
- pOutSample->SetDiscontinuity(FALSE);
+ pNewOutSample->SetTime(nullptr, nullptr);
+ pNewOutSample->SetDiscontinuity(FALSE);
}
- BYTE* pOut = nullptr;
- if (FAILED(hr = pOutSample->GetPointer(&pOut))) {
+ BYTE* pNewOut = nullptr;
+ if (FAILED(hr = pNewOutSample->GetPointer(&pNewOut))) {
return hr;
}
- BYTE* pOutOrg = pOut;
+ BYTE* pNewOutOrg = pNewOut;
- long size = pOutSample->GetSize();
+ long newSize = pNewOutSample->GetSize();
const GUID* majortype = &m_pOutput->CurrentMediaType().majortype;
const GUID* subtype = &m_pOutput->CurrentMediaType().subtype;
if (*majortype == MEDIATYPE_DVD_ENCRYPTED_PACK) {
- if (size < curlen + 32 + 3) {
+ if (newSize < curlen + 32 + 3) {
return E_FAIL;
}
@@ -181,14 +181,14 @@ HRESULT CAVI2AC3Filter::Transform(IMediaSample* pSample, IMediaSample* pOutSampl 0x01, 0x89, 0xC3, 0xF8, // mux rate (1260000 bytes/sec, 22bits), marker (2bits), reserved (~0, 5bits), stuffing (0, 3bits)
};
- memcpy(pOut, &PESHeader, sizeof(PESHeader));
- pOut += sizeof(PESHeader);
+ memcpy(pNewOut, &PESHeader, sizeof(PESHeader));
+ pNewOut += sizeof(PESHeader);
majortype = &MEDIATYPE_MPEG2_PES;
}
if (*majortype == MEDIATYPE_MPEG2_PES) {
- if (size < curlen + 20 + 3) {
+ if (newSize < curlen + 20 + 3) {
return E_FAIL;
}
@@ -232,24 +232,24 @@ HRESULT CAVI2AC3Filter::Transform(IMediaSample* pSample, IMediaSample* pOutSampl }
}
- memcpy(pOut, &Private1Header, sizeof(Private1Header));
- pOut += sizeof(Private1Header);
+ memcpy(pNewOut, &Private1Header, sizeof(Private1Header));
+ pNewOut += sizeof(Private1Header);
majortype = &MEDIATYPE_Audio;
}
if (*majortype == MEDIATYPE_Audio) {
- if (size < curlen) {
+ if (newSize < curlen) {
return E_FAIL;
}
- memcpy(pOut, pIn, curlen);
+ memcpy(pNewOut, pIn, curlen);
pIn += curlen;
- pOut += curlen;
+ pNewOut += curlen;
}
- pOutSample->SetActualDataLength(long(pOut - pOutOrg));
+ pNewOutSample->SetActualDataLength(long(pNewOut - pNewOutOrg));
- m_pOutput->Deliver(pOutSample);
+ m_pOutput->Deliver(pNewOutSample);
}
return S_FALSE;
diff --git a/src/mpc-hc/AppSettings.cpp b/src/mpc-hc/AppSettings.cpp index dc46f9282..c306f9477 100644 --- a/src/mpc-hc/AppSettings.cpp +++ b/src/mpc-hc/AppSettings.cpp @@ -1581,9 +1581,9 @@ void CAppSettings::LoadSettings() // if (!SHGetSpecialFolderPath(nullptr, MyPictures.GetBufferSetLength(MAX_PATH), CSIDL_MYPICTURES, TRUE)) MyPictures.Empty();
// else MyPictures.ReleaseBuffer();
if (ERROR_SUCCESS == key.Open(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"), KEY_READ)) {
- ULONG len = MAX_PATH;
- if (ERROR_SUCCESS == key.QueryStringValue(_T("My Pictures"), MyPictures.GetBuffer(MAX_PATH), &len)) {
- MyPictures.ReleaseBufferSetLength(len);
+ ULONG lenValue = MAX_PATH;
+ if (ERROR_SUCCESS == key.QueryStringValue(_T("My Pictures"), MyPictures.GetBuffer(MAX_PATH), &lenValue)) {
+ MyPictures.ReleaseBufferSetLength(lenValue);
} else {
MyPictures.Empty();
}
@@ -2278,18 +2278,18 @@ void CAppSettings::UpdateSettings() // so that all incremental updates are applied.
switch (version) {
case 0: {
- UINT nAudioBoost = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, -1);
- if (nAudioBoost == UINT(-1)) {
+ UINT nAudioBoostTmp = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, -1);
+ if (nAudioBoostTmp == UINT(-1)) {
double dAudioBoost_dB = _tstof(pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, _T("0")));
if (dAudioBoost_dB < 0 || dAudioBoost_dB > 10) {
dAudioBoost_dB = 0;
}
- nAudioBoost = UINT(100 * pow(10.0, dAudioBoost_dB / 20.0) + 0.5) - 100;
+ nAudioBoostTmp = UINT(100 * pow(10.0, dAudioBoost_dB / 20.0) + 0.5) - 100;
}
- if (nAudioBoost > 300) { // Max boost is 300%
- nAudioBoost = 300;
+ if (nAudioBoostTmp > 300) { // Max boost is 300%
+ nAudioBoostTmp = 300;
}
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, nAudioBoost);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, nAudioBoostTmp);
ConvertOldExternalFiltersList();
}
diff --git a/src/mpc-hc/DebugShadersDlg.cpp b/src/mpc-hc/DebugShadersDlg.cpp index 3adb9007a..7086eb04d 100644 --- a/src/mpc-hc/DebugShadersDlg.cpp +++ b/src/mpc-hc/DebugShadersDlg.cpp @@ -249,16 +249,16 @@ void CDebugShadersDlg::OnRecompileShader() profile = "ps_2_0"; break; } - CString disasm, msg; + CString disasm, compilerMsg; if (SUCCEEDED(m_Compiler.CompileShaderFromFile(shader.filePath, "main", profile, - D3DXSHADER_DEBUG, nullptr, &disasm, &msg))) { - if (!msg.IsEmpty()) { - msg += _T("\n"); + D3DXSHADER_DEBUG, nullptr, &disasm, &compilerMsg))) { + if (!compilerMsg.IsEmpty()) { + compilerMsg += _T("\n"); } - msg += disasm; + compilerMsg += disasm; } - msg.Replace(_T("\n"), _T("\r\n")); - m_DebugInfo.SetWindowText(msg); + compilerMsg.Replace(_T("\n"), _T("\r\n")); + m_DebugInfo.SetWindowText(compilerMsg); } else { m_DebugInfo.SetWindowText(_T("File not found")); } diff --git a/src/mpc-hc/FGFilter.cpp b/src/mpc-hc/FGFilter.cpp index 001eb1bb2..3b92ab5fc 100644 --- a/src/mpc-hc/FGFilter.cpp +++ b/src/mpc-hc/FGFilter.cpp @@ -204,9 +204,10 @@ CFGFilterRegistry::CFGFilterRegistry(const CLSID& clsid, UINT64 merit) DWORD len = _countof(buff);
for (DWORD i = 0; ERROR_SUCCESS == catkey.EnumKey(i, buff, &len, &ft); i++, len = _countof(buff)) {
if (ERROR_SUCCESS == key.Open(catkey, buff, KEY_READ)) {
- TCHAR clsid[256];
- len = _countof(clsid);
- if (ERROR_SUCCESS == key.QueryStringValue(_T("CLSID"), clsid, &len) && GUIDFromCString(clsid) == m_clsid) {
+ TCHAR clsidString[256];
+ len = _countof(clsidString);
+ if (ERROR_SUCCESS == key.QueryStringValue(_T("CLSID"), clsidString, &len)
+ && GUIDFromCString(clsidString) == m_clsid) {
break;
}
@@ -365,7 +366,7 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len) p += 12;
while (nTypes-- > 0) {
ChkLen(1)
- BYTE n = *p - 0x30;
+ n = *p - 0x30;
p++;
UNREFERENCED_PARAMETER(n);
@@ -376,7 +377,7 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len) UNREFERENCED_PARAMETER(ty);
ChkLen(5)
- BYTE x33 = *p;
+ x33 = *p;
p++;
ASSERT(x33 == 0x33);
UNREFERENCED_PARAMETER(x33);
diff --git a/src/mpc-hc/FGFilterLAV.cpp b/src/mpc-hc/FGFilterLAV.cpp index 7dbfca199..a13188bd2 100644 --- a/src/mpc-hc/FGFilterLAV.cpp +++ b/src/mpc-hc/FGFilterLAV.cpp @@ -231,14 +231,14 @@ HRESULT CFGFilterLAV::PropertyPageCallback(IBaseFilter* pBF) if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVSplitter
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVVideoSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVVideoSettings> pLAVVideoSettings = pBF) {
CFGFilterLAVVideo::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVVideo
+ if (settings.GetSettings(pLAVVideoSettings)) { // Get current settings from LAVVideo
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVAudioSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVAudioSettings> pLAVAudioSettings = pBF) {
CFGFilterLAVAudio::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVAudio
+ if (settings.GetSettings(pLAVAudioSettings)) { // Get current settings from LAVAudio
settings.SaveSettings(); // Save them to the registry/ini
}
}
diff --git a/src/mpc-hc/FGManager.cpp b/src/mpc-hc/FGManager.cpp index 81b762279..c9eaaaf23 100644 --- a/src/mpc-hc/FGManager.cpp +++ b/src/mpc-hc/FGManager.cpp @@ -347,7 +347,7 @@ HRESULT CFGManager::EnumSourceFilters(LPCWSTR lpcwstrFileName, CFGFilterList& fl CRegKey key;
if (ERROR_SUCCESS == key.Open(HKEY_CLASSES_ROOT, _T("Media Type\\Extensions\\") + CString(ext), KEY_READ)) {
- ULONG len = _countof(buff);
+ len = _countof(buff);
ZeroMemory(buff, sizeof(buff));
LONG ret = key.QueryStringValue(_T("Source Filter"), buff, &len); // QueryStringValue can return ERROR_INVALID_DATA on bogus strings (radlight mpc v1003, fixed in v1004)
if (ERROR_SUCCESS == ret || ERROR_INVALID_DATA == ret && GUIDFromCString(buff) != GUID_NULL) {
@@ -426,7 +426,7 @@ HRESULT CFGManager::AddSourceFilter(CFGFilter* pFGF, LPCWSTR lpcwstrFileName, LP }
// doh :P
- BeginEnumMediaTypes(GetFirstPin(pBF, PINDIR_OUTPUT), pEMT, pmt) {
+ BeginEnumMediaTypes(GetFirstPin(pBF, PINDIR_OUTPUT), pEMT, pmt2) {
static const GUID guid1 =
{ 0x640999A0, 0xA946, 0x11D0, { 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
static const GUID guid2 =
@@ -434,7 +434,7 @@ HRESULT CFGManager::AddSourceFilter(CFGFilter* pFGF, LPCWSTR lpcwstrFileName, LP static const GUID guid3 =
{ 0xD51BD5AE, 0x7548, 0x11CF, { 0xA5, 0x20, 0x00, 0x80, 0xC7, 0x7E, 0xF5, 0x8A } };
- if (pmt->subtype == guid1 || pmt->subtype == guid2 || pmt->subtype == guid3) {
+ if (pmt2->subtype == guid1 || pmt2->subtype == guid2 || pmt2->subtype == guid3) {
RemoveFilter(pBF);
pFGF = DEBUG_NEW CFGFilterRegistry(CLSID_NetShowSource);
hr = AddSourceFilter(pFGF, lpcwstrFileName, lpcwstrFilterName, ppBF);
@@ -442,7 +442,7 @@ HRESULT CFGManager::AddSourceFilter(CFGFilter* pFGF, LPCWSTR lpcwstrFileName, LP return hr;
}
}
- EndEnumMediaTypes(pmt);
+ EndEnumMediaTypes(pmt2);
*ppBF = pBF.Detach();
@@ -791,9 +791,9 @@ HRESULT CFGManager::Connect(IPin* pPinOut, IPin* pPinIn, bool bContinueRender) // maybe the application should do this...
- POSITION pos = pUnks.GetHeadPosition();
- while (pos) {
- if (CComQIPtr<IMixerPinConfig, &IID_IMixerPinConfig> pMPC = pUnks.GetNext(pos)) {
+ POSITION posInterface = pUnks.GetHeadPosition();
+ while (posInterface) {
+ if (CComQIPtr<IMixerPinConfig, &IID_IMixerPinConfig> pMPC = pUnks.GetNext(posInterface)) {
pMPC->SetAspectRatioMode(AM_ARMODE_STRETCHED);
}
}
@@ -1232,7 +1232,7 @@ STDMETHODIMP CFGManager::NukeDownstream(IUnknown* pUnk) CComPtr<IPin> pPinTo;
if (S_OK == IsPinDirection(pPin, PINDIR_OUTPUT)
&& SUCCEEDED(pPin->ConnectedTo(&pPinTo)) && pPinTo) {
- if (CComPtr<IBaseFilter> pBF = GetFilterFromPin(pPinTo)) {
+ if (pBF = GetFilterFromPin(pPinTo)) {
if (GetCLSID(pBF) == CLSID_EnhancedVideoRenderer) {
// GetFilterFromPin() returns pointer to the Base EVR,
// but we need to remove Outer EVR from the graph.
@@ -2235,7 +2235,7 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk) merit += merit_low++;
- CFGFilter* pFGF = nullptr;
+ pFGF = nullptr;
if (fo->type == FilterOverride::REGISTERED) {
pFGF = DEBUG_NEW CFGFilterRegistry(fo->dispname, merit);
diff --git a/src/mpc-hc/FGManagerBDA.cpp b/src/mpc-hc/FGManagerBDA.cpp index cbb84cf2e..da97f4a71 100644 --- a/src/mpc-hc/FGManagerBDA.cpp +++ b/src/mpc-hc/FGManagerBDA.cpp @@ -458,7 +458,7 @@ HRESULT CFGManagerBDA::ConnectFilters(IBaseFilter* pOutFilter, IBaseFilter* pInF BeginEnumPins(pOutFilter, pEP, pOutPin) {
if (S_OK == IsPinDirection(pOutPin, PINDIR_OUTPUT)
&& S_OK != IsPinConnected(pOutPin)) {
- BeginEnumPins(pInFilter, pEP, pInPin) {
+ BeginEnumPins(pInFilter, pEP2, pInPin) {
if (S_OK == IsPinDirection(pInPin, PINDIR_INPUT)
&& S_OK != IsPinConnected(pInPin)) {
hr = this->ConnectDirect(pOutPin, pInPin, nullptr);
diff --git a/src/mpc-hc/MainFrm.cpp b/src/mpc-hc/MainFrm.cpp index ef004dd39..6df4fdcce 100644 --- a/src/mpc-hc/MainFrm.cpp +++ b/src/mpc-hc/MainFrm.cpp @@ -2963,8 +2963,6 @@ void CMainFrame::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu) //pPopupMenu->ModifyMenu(i, MF_BYPOSITION|MF_STRING, nID, str);
// this works fine
- MENUITEMINFO mii;
- mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STRING;
mii.dwTypeData = (LPTSTR)(LPCTSTR)str;
VERIFY(pPopupMenu->SetMenuItemInfo(i, &mii, TRUE));
@@ -4609,21 +4607,21 @@ void CMainFrame::SaveDIB(LPCTSTR fn, BYTE* pData, long size) Gdiplus::Bitmap* bm = new Gdiplus::Bitmap(w, h, dstpitch, PixelFormat24bppRGB, p);
- UINT num; // number of image encoders
- UINT size; // size, in bytes, of the image encoder array
+ UINT num; // number of image encoders
+ UINT arraySize; // size, in bytes, of the image encoder array
// How many encoders are there?
// How big (in bytes) is the array of all ImageCodecInfo objects?
- Gdiplus::GetImageEncodersSize(&num, &size);
+ Gdiplus::GetImageEncodersSize(&num, &arraySize);
// Create a buffer large enough to hold the array of ImageCodecInfo
// objects that will be returned by GetImageEncoders.
- Gdiplus::ImageCodecInfo* pImageCodecInfo = (Gdiplus::ImageCodecInfo*)DEBUG_NEW BYTE[size];
+ Gdiplus::ImageCodecInfo* pImageCodecInfo = (Gdiplus::ImageCodecInfo*)DEBUG_NEW BYTE[arraySize];
// GetImageEncoders creates an array of ImageCodecInfo objects
// and copies that array into a previously allocated buffer.
// The third argument, imageCodecInfos, is a pointer to that buffer.
- Gdiplus::GetImageEncoders(num, size, pImageCodecInfo);
+ Gdiplus::GetImageEncoders(num, arraySize, pImageCodecInfo);
Gdiplus::EncoderParameters* pEncoderParameters = nullptr;
@@ -7758,14 +7756,14 @@ void CMainFrame::OnPlayFilters(UINT nID) if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVSplitter
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVVideoSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVVideoSettings> pLAVVideoSettings = pBF) {
CFGFilterLAVVideo::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVVideo
+ if (settings.GetSettings(pLAVVideoSettings)) { // Get current settings from LAVVideo
settings.SaveSettings(); // Save them to the registry/ini
}
- } else if (CComQIPtr<ILAVAudioSettings> pLAVFSettings = pBF) {
+ } else if (CComQIPtr<ILAVAudioSettings> pLAVAudioSettings = pBF) {
CFGFilterLAVAudio::Settings settings;
- if (settings.GetSettings(pLAVFSettings)) { // Get current settings from LAVAudio
+ if (settings.GetSettings(pLAVAudioSettings)) { // Get current settings from LAVAudio
settings.SaveSettings(); // Save them to the registry/ini
}
}
@@ -8850,12 +8848,11 @@ void CMainFrame::AddFavorite(bool fDisplayMessage, bool fShowDialog) args.AddTail(name);
// RememberPos
- CString pos(_T("0"));
+ CString posStr = _T("0");
if (s.bFavRememberPos) {
- pos.Format(_T("%I64d"), GetPos());
+ posStr.Format(_T("%I64d"), GetPos());
}
-
- args.AddTail(pos);
+ args.AddTail(posStr);
// RelativeDrive
CString relativeDrive;
@@ -10325,10 +10322,10 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD) const CAppSettings& s = AfxGetAppSettings();
- if (OpenFileData* p = dynamic_cast<OpenFileData*>(pOMD)) {
- engine_t engine = s.m_Formats.GetEngine(p->fns.GetHead());
+ if (auto pOpenFileData = dynamic_cast<OpenFileData*>(pOMD)) {
+ engine_t engine = s.m_Formats.GetEngine(pOpenFileData->fns.GetHead());
- CStringA ct = GetContentType(p->fns.GetHead());
+ CStringA ct = GetContentType(pOpenFileData->fns.GetHead());
if (ct == "video/x-ms-asf") {
// TODO: put something here to make the windows media source filter load later
@@ -10403,9 +10400,9 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD) if (!m_fCustomGraph) {
m_pGB = DEBUG_NEW CFGManagerPlayer(_T("CFGManagerPlayer"), nullptr, m_pVideoWnd->m_hWnd);
}
- } else if (OpenDVDData* p = dynamic_cast<OpenDVDData*>(pOMD)) {
+ } else if (auto pOpenDVDData = dynamic_cast<OpenDVDData*>(pOMD)) {
m_pGB = DEBUG_NEW CFGManagerDVD(_T("CFGManagerDVD"), nullptr, m_pVideoWnd->m_hWnd);
- } else if (OpenDeviceData* p = dynamic_cast<OpenDeviceData*>(pOMD)) {
+ } else if (auto pOpenDeviceData = dynamic_cast<OpenDeviceData*>(pOMD)) {
if (s.iDefaultCaptureDevice == 1) {
m_pGB = DEBUG_NEW CFGManagerBDA(_T("CFGManagerBDA"), nullptr, m_pVideoWnd->m_hWnd);
} else {
@@ -11620,8 +11617,7 @@ int CMainFrame::SetupSubtitleStreams() {
const CAppSettings& s = AfxGetAppSettings();
- size_t cStreams = m_pSubStreams.GetCount();
- if (cStreams > 0) {
+ if (!m_pSubStreams.IsEmpty()) {
bool externalPriority = false;
CAtlArray<CString> langs;
int tPos = 0;
@@ -13246,14 +13242,14 @@ void CMainFrame::SetupFavoritesSubMenu() UINT nLastGroupStart = subMenu.GetMenuItemCount();
UINT id = ID_FAVORITES_FILE_START;
- CAtlList<CString> sl;
- AfxGetAppSettings().GetFav(FAV_FILE, sl);
- POSITION pos = sl.GetHeadPosition();
+ CAtlList<CString> favs;
+ AfxGetAppSettings().GetFav(FAV_FILE, favs);
+ POSITION pos = favs.GetHeadPosition();
while (pos) {
UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
- CString f_str = sl.GetNext(pos);
+ CString f_str = favs.GetNext(pos);
f_str.Replace(_T("&"), _T("&&"));
f_str.Replace(_T("\t"), _T(" "));
@@ -13302,13 +13298,13 @@ void CMainFrame::SetupFavoritesSubMenu() nLastGroupStart = subMenu.GetMenuItemCount();
id = ID_FAVORITES_DVD_START;
- s.GetFav(FAV_DVD, sl);
- pos = sl.GetHeadPosition();
+ s.GetFav(FAV_DVD, favs);
+ pos = favs.GetHeadPosition();
while (pos) {
UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
- CString str = sl.GetNext(pos);
+ CString str = favs.GetNext(pos);
str.Replace(_T("&"), _T("&&"));
CAtlList<CString> sl;
@@ -13335,13 +13331,13 @@ void CMainFrame::SetupFavoritesSubMenu() id = ID_FAVORITES_DEVICE_START;
- s.GetFav(FAV_DEVICE, sl);
+ s.GetFav(FAV_DEVICE, favs);
- pos = sl.GetHeadPosition();
+ pos = favs.GetHeadPosition();
while (pos) {
UINT flags = MF_BYCOMMAND | MF_STRING | MF_ENABLED;
- CString str = sl.GetNext(pos);
+ CString str = favs.GetNext(pos);
str.Replace(_T("&"), _T("&&"));
CAtlList<CString> sl;
@@ -16644,7 +16640,7 @@ void CMainFrame::UpdateSubAspectRatioCompensation() {
const CAppSettings& s = AfxGetAppSettings();
if (auto pRTS = dynamic_cast<CRenderedTextSubtitle*>((ISubStream*)m_pCurrentSubInput.pSubStream)) {
- CAutoLock cAutoLock(&m_csSubtitleManagementLock);
+ CAutoLock autoLockSubtitleManagement(&m_csSubtitleManagementLock);
bool bInvalidate = false;
double dPARCompensation = 1.0;
@@ -16668,7 +16664,7 @@ void CMainFrame::UpdateSubAspectRatioCompensation() pRTS->m_ePARCompensationType = CSimpleTextSubtitle::EPARCompensationType::EPCTAccurateSize_ISR;
if (pRTS->m_dPARCompensation != dPARCompensation) {
- CAutoLock cAutoLock(&m_csSubLock);
+ CAutoLock autoLock(&m_csSubLock);
bInvalidate = true;
pRTS->m_dPARCompensation = dPARCompensation;
pRTS->Deinit();
diff --git a/src/mpc-hc/PlayerCaptureDialog.cpp b/src/mpc-hc/PlayerCaptureDialog.cpp index 11c6c018f..84556c275 100644 --- a/src/mpc-hc/PlayerCaptureDialog.cpp +++ b/src/mpc-hc/PlayerCaptureDialog.cpp @@ -294,9 +294,9 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo vih2->dwPictAspectRatioX = 4;
vih2->dwPictAspectRatioY = 3;
- AM_MEDIA_TYPE* pmt = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
- CopyMediaType(pmt, &mtCap);
- tfa.AddFormat(pmt, pcaps, sizeof(*pcaps));
+ AM_MEDIA_TYPE* pmt2 = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
+ CopyMediaType(pmt2, &mtCap);
+ tfa.AddFormat(pmt2, pcaps, sizeof(*pcaps));
}
} else if (mtCap.formattype == FORMAT_VideoInfo2) {
VIDEOINFOHEADER2* vih2 = (VIDEOINFOHEADER2*)mtCap.pbFormat;
@@ -338,12 +338,12 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo }
CFormat<T>* pf = nullptr;
- CFormatElem<T>* pfe = nullptr;
+ CFormatElem<T>* pfeCurrent = nullptr;
if (!pcurmt) {
pf = tfa[0];
- pfe = pf->GetAt(0);
- } else if (!tfa.FindFormat(pcurmt, nullptr, &pf, &pfe) && !tfa.FindFormat(pcurmt, &pf)) {
+ pfeCurrent = pf->GetAt(0);
+ } else if (!tfa.FindFormat(pcurmt, nullptr, &pf, &pfeCurrent) && !tfa.FindFormat(pcurmt, &pf)) {
if (pcurmt) {
DeleteMediaType(pcurmt);
}
@@ -360,7 +360,7 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo if (iType < 0 && type.GetCount()) {
type.SetCurSel(0);
}
- int iDim = dim.SetCurSel(dim.FindStringExact(0, tfa.MakeDimensionName(pfe)));
+ int iDim = dim.SetCurSel(dim.FindStringExact(0, tfa.MakeDimensionName(pfeCurrent)));
// if (iDim < 0 && dim.GetCount()) dim.SetCurSel(iDim = 0);
CorrectComboListWidth(type);
@@ -1072,7 +1072,6 @@ void CPlayerCaptureDialog::UpdateVideoControls() if (m_vidinput.GetCount() > 0) {
m_vidinput.EnableWindow(TRUE);
- long OutputPinCount, InputPinCount;
if (SUCCEEDED(m_pAMXB->get_PinCounts(&OutputPinCount, &InputPinCount))) {
for (int i = 0; i < OutputPinCount; i++) {
long InputPinIndex;
@@ -1612,18 +1611,18 @@ void CPlayerCaptureDialog::OnRecord() if (m_fSepAudio && m_fAudOutput && m_pAudMux && !audfn.IsEmpty()) {
audfn += _T("wav");
- CComQIPtr<IFileSinkFilter2> pFSF = m_pAudMux;
- if (pFSF) {
+ CComQIPtr<IFileSinkFilter2> pFSFAudioMux = m_pAudMux;
+ if (pFSFAudioMux) {
m_pAudDst = m_pAudMux;
} else {
m_pAudDst = nullptr;
m_pAudDst.CoCreateInstance(CLSID_FileWriter);
- pFSF = m_pAudDst;
+ pFSFAudioMux = m_pAudDst;
}
- if (!pFSF
- || FAILED(pFSF->SetFileName(CStringW(audfn), nullptr))
- || FAILED(pFSF->SetMode(AM_FILE_OVERWRITE))) {
+ if (!pFSFAudioMux
+ || FAILED(pFSFAudioMux->SetFileName(CStringW(audfn), nullptr))
+ || FAILED(pFSFAudioMux->SetMode(AM_FILE_OVERWRITE))) {
MessageBox(ResStr(IDS_CAPTURE_ERROR_AUD_OUT_FILE), ResStr(IDS_CAPTURE_ERROR), MB_ICONERROR | MB_OK);
return;
}
diff --git a/src/mpc-hc/PlayerPlaylistBar.cpp b/src/mpc-hc/PlayerPlaylistBar.cpp index dcf7937e7..faf960e80 100644 --- a/src/mpc-hc/PlayerPlaylistBar.cpp +++ b/src/mpc-hc/PlayerPlaylistBar.cpp @@ -1383,12 +1383,12 @@ BOOL CPlayerPlaylistBar::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResul return TRUE; // message was handled
}
-void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p)
+void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
{
LVHITTESTINFO lvhti;
bool bOnItem;
- if (p.x == -1 && p.y == -1) {
+ if (point.x == -1 && point.y == -1) {
lvhti.iItem = m_list.GetSelectionMark();
if (lvhti.iItem == -1 && m_pl.GetCount() == 1) {
@@ -1397,14 +1397,14 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p) CRect r;
if (!!m_list.GetItemRect(lvhti.iItem, r, LVIR_BOUNDS)) {
- p.SetPoint(r.left, r.bottom);
+ point.SetPoint(r.left, r.bottom);
} else {
- p.SetPoint(0, 0);
+ point.SetPoint(0, 0);
}
- m_list.ClientToScreen(&p);
+ m_list.ClientToScreen(&point);
bOnItem = lvhti.iItem != -1;
} else {
- lvhti.pt = p;
+ lvhti.pt = point;
m_list.ScreenToClient(&lvhti.pt);
m_list.SubItemHitTest(&lvhti);
bOnItem = lvhti.iItem >= 0 && !!(lvhti.flags & LVHT_ONITEM);
@@ -1464,7 +1464,7 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p) m.AppendMenu(MF_SEPARATOR);
m.AppendMenu(MF_STRING | MF_ENABLED | (s.bHidePlaylistFullScreen ? MF_CHECKED : MF_UNCHECKED), M_HIDEFULLSCREEN, ResStr(IDS_PLAYLIST_HIDEFS));
- int nID = (int)m.TrackPopupMenu(TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, this);
+ int nID = (int)m.TrackPopupMenu(TPM_LEFTBUTTON | TPM_RETURNCMD, point.x, point.y, this);
switch (nID) {
case M_OPEN:
m_pl.SetPos(pos);
@@ -1542,15 +1542,15 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p) std::set<CString, CStringUtils::LogicalLess> fileList;
{
// convert to stl
- POSITION pos = fileListAtl.GetHeadPosition();
- while (pos) {
- fileList.emplace_hint(fileList.end(), fileListAtl.GetNext(pos));
+ POSITION pos2 = fileListAtl.GetHeadPosition();
+ while (pos2) {
+ fileList.emplace_hint(fileList.end(), fileListAtl.GetNext(pos2));
}
// deduplicate
- pos = m_pl.GetHeadPosition();
- while (pos) {
- const CPlaylistItem& pli = m_pl.GetNext(pos);
+ pos2 = m_pl.GetHeadPosition();
+ while (pos2) {
+ const CPlaylistItem& pli = m_pl.GetNext(pos2);
POSITION subpos = pli.m_fns.GetHeadPosition();
while (subpos) {
fileList.erase(pli.m_fns.GetNext(subpos));
@@ -1660,26 +1660,26 @@ void CPlayerPlaylistBar::OnContextMenu(CWnd* /*pWnd*/, CPoint p) if (pli.m_type != CPlaylistItem::file) {
fRemovePath = false;
} else {
- POSITION pos;
+ POSITION pos2;
- pos = pli.m_fns.GetHeadPosition();
- while (pos && fRemovePath) {
- CString fn = pli.m_fns.GetNext(pos);
+ pos2 = pli.m_fns.GetHeadPosition();
+ while (pos2 && fRemovePath) {
+ CString fn = pli.m_fns.GetNext(pos2);
- CPath p(fn);
- p.RemoveFileSpec();
- if (base != (LPCTSTR)p) {
+ CPath fnPath(fn);
+ fnPath.RemoveFileSpec();
+ if (base != (LPCTSTR)fnPath) {
fRemovePath = false;
}
}
- pos = pli.m_subs.GetHeadPosition();
- while (pos && fRemovePath) {
- CString fn = pli.m_subs.GetNext(pos);
+ pos2 = pli.m_subs.GetHeadPosition();
+ while (pos2 && fRemovePath) {
+ CString fn = pli.m_subs.GetNext(pos2);
- CPath p(fn);
- p.RemoveFileSpec();
- if (base != (LPCTSTR)p) {
+ CPath fnPath(fn);
+ fnPath.RemoveFileSpec();
+ if (base != (LPCTSTR)fnPath) {
fRemovePath = false;
}
}
diff --git a/src/mpc-hc/PlayerPlaylistBar.h b/src/mpc-hc/PlayerPlaylistBar.h index 25f3e5ed4..0cdd804ad 100644 --- a/src/mpc-hc/PlayerPlaylistBar.h +++ b/src/mpc-hc/PlayerPlaylistBar.h @@ -154,7 +154,7 @@ public: afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnTimer(UINT_PTR nIDEvent);
- afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);
+ afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint point);
afx_msg void OnLvnEndlabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnXButtonDown(UINT nFlags, UINT nButton, CPoint point);
afx_msg void OnXButtonUp(UINT nFlags, UINT nButton, CPoint point);
diff --git a/src/mpc-hc/PlayerSubresyncBar.cpp b/src/mpc-hc/PlayerSubresyncBar.cpp index cae5d17a2..52f18d5c7 100644 --- a/src/mpc-hc/PlayerSubresyncBar.cpp +++ b/src/mpc-hc/PlayerSubresyncBar.cpp @@ -893,7 +893,7 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult) EFFECTFIRST, EFFECTLAST = EFFECTFIRST + 1000
};
- CStringArray styles;
+ CStringArray stylesNames;
CStringArray actors;
CStringArray effects;
@@ -937,7 +937,7 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult) CString key;
STSStyle* val;
m_sts.m_styles.GetNextAssoc(pos, key, val);
- styles.Add(key);
+ stylesNames.Add(key);
m.AppendMenu(MF_STRING | MF_ENABLED, id++, key);
}
@@ -1124,7 +1124,7 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult) break;
default:
if (STYLEFIRST <= id && id <= STYLELAST) {
- CString s = styles[id - STYLEFIRST];
+ CString s = stylesNames[id - STYLEFIRST];
if (m_sts[iItem].style != s) {
m_sts[iItem].style = s;
bNeedsUpdate = true;
@@ -1136,11 +1136,11 @@ void CPlayerSubresyncBar::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult) STSStyle* stss = m_sts.GetStyle(iItem);
int iSelPage = 0;
- POSITION pos = m_sts.m_styles.GetStartPosition();
- for (int i = 0; pos; i++) {
+ POSITION posStyles = m_sts.m_styles.GetStartPosition();
+ for (int i = 0; posStyles; i++) {
CString key;
STSStyle* val;
- m_sts.m_styles.GetNextAssoc(pos, key, val);
+ m_sts.m_styles.GetNextAssoc(posStyles, key, val);
CAutoPtr<CPPageSubStyle> page(DEBUG_NEW CPPageSubStyle());
page->InitStyle(key, *val);
diff --git a/src/mpc-hc/WebClientSocket.cpp b/src/mpc-hc/WebClientSocket.cpp index 1f409d2fb..2bcafcbc4 100644 --- a/src/mpc-hc/WebClientSocket.cpp +++ b/src/mpc-hc/WebClientSocket.cpp @@ -100,10 +100,10 @@ void CWebClientSocket::HandleRequest() {
// remember new cookies
- CStringA value;
- if (m_hdrlines.Lookup("cookie", value)) {
+ CStringA cookie;
+ if (m_hdrlines.Lookup("cookie", cookie)) {
CAtlList<CStringA> sl;
- Explode(value, sl, ';');
+ Explode(cookie, sl, ';');
POSITION pos = sl.GetHeadPosition();
while (pos) {
CAtlList<CStringA> sl2;
@@ -190,16 +190,16 @@ void CWebClientSocket::HandleRequest() reshdr += "Set-Cookie: " + key + "=" + TToA(value);
POSITION pos2 = m_cookieattribs.GetStartPosition();
while (pos2) {
- cookie_attribs value;
- m_cookieattribs.GetNextAssoc(pos2, key, value);
- if (!value.path.IsEmpty()) {
- reshdr += "; path=" + value.path;
+ cookie_attribs attribs;
+ m_cookieattribs.GetNextAssoc(pos2, key, attribs);
+ if (!attribs.path.IsEmpty()) {
+ reshdr += "; path=" + attribs.path;
}
- if (!value.expire.IsEmpty()) {
- reshdr += "; expire=" + value.expire;
+ if (!attribs.expire.IsEmpty()) {
+ reshdr += "; expire=" + attribs.expire;
}
- if (!value.domain.IsEmpty()) {
- reshdr += "; domain=" + value.domain;
+ if (!attribs.domain.IsEmpty()) {
+ reshdr += "; domain=" + attribs.domain;
}
}
reshdr += "\r\n";
@@ -490,7 +490,7 @@ bool CWebClientSocket::OnBrowser(CStringA& hdr, CStringA& body, CStringA& mime) *(DWORD*)p = (DWORD)cmdln.GetCount();
p += sizeof(DWORD);
- POSITION pos = cmdln.GetHeadPosition();
+ pos = cmdln.GetHeadPosition();
while (pos) {
CString& str = cmdln.GetNext(pos);
len = (str.GetLength() + 1) * sizeof(TCHAR);
|