diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-09-29 01:08:31 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-09-29 01:08:31 +0400 |
commit | 00211e6d17addb15800206b6d50333cba173adef (patch) | |
tree | 18e98ee2338ac0344fecdbf8ebb2f145920a827e | |
parent | ee32d54519ea7718d8bce7cb0db52b3e98330058 (diff) |
cosmetics, updated lcms2
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2645 10f7b99b-c216-0410-bff0-8a66a9350fd8
21 files changed, 106 insertions, 92 deletions
diff --git a/src/apps/mplayerc/Changelog.txt b/src/apps/mplayerc/Changelog.txt index 449c6fe5e..e24ddfd50 100644 --- a/src/apps/mplayerc/Changelog.txt +++ b/src/apps/mplayerc/Changelog.txt @@ -12,7 +12,7 @@ v1.5.xxxx.0 - unreleased CHANGED: Updated FFmpeg
CHANGED: Updated MediaInfoLib to v0.7.36 Beta
CHANGED: Updated ZenLib to v0.4.16 Beta
- CHANGED: Updated Little CMS to v2.1(alpha1) - 09172010
+ CHANGED: Updated Little CMS to v2.1(alpha1) - 09282010
CHANGED: Updated libpng to v1.4.4
CHANGED: Cleaned up and optimized code for QT PCM, small corrections in MP4Splitter
CHANGED: Removed DSM Converter
diff --git a/src/apps/mplayerc/FGFilter.cpp b/src/apps/mplayerc/FGFilter.cpp index c21196da2..3c44dfa66 100644 --- a/src/apps/mplayerc/FGFilter.cpp +++ b/src/apps/mplayerc/FGFilter.cpp @@ -77,13 +77,13 @@ bool CFGFilter::CheckTypes(const CAtlArray<GUID>& types, bool fExactMatch) if(fExactMatch)
{
if(majortype == types[i] && majortype != GUID_NULL
- && subtype == types[i+1] && subtype != GUID_NULL)
+ && subtype == types[i+1] && subtype != GUID_NULL)
return true;
}
else
{
if((majortype == GUID_NULL || types[i] == GUID_NULL || majortype == types[i])
- && (subtype == GUID_NULL || types[i+1] == GUID_NULL || subtype == types[i+1]))
+ && (subtype == GUID_NULL || types[i+1] == GUID_NULL || subtype == types[i+1]))
return true;
}
}
@@ -306,7 +306,7 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len) BYTE* ptr = NULL;
if(SUCCEEDED(pFD.CoCreateInstance(CLSID_FilterMapper2))
- && SUCCEEDED(pFD->ParseFilterData(p, len, (BYTE**)&ptr)))
+ && SUCCEEDED(pFD->ParseFilterData(p, len, (BYTE**)&ptr)))
{
REGFILTER2* prf = (REGFILTER2*)*(WPARAM*)ptr; // this is f*cked up
@@ -412,7 +412,7 @@ void CFGFilterRegistry::ExtractFilterData(BYTE* p, UINT len) ChkLen(8)
if(*(DWORD*)p < (p-base+8) || *(DWORD*)p >= len
- || *(DWORD*)(p+4) < (p-base+8) || *(DWORD*)(p+4) >= len)
+ || *(DWORD*)(p+4) < (p-base+8) || *(DWORD*)(p+4) >= len)
{
p += 8;
continue;
@@ -468,17 +468,17 @@ HRESULT CFGFilterVideoRenderer::Create(IBaseFilter** ppBF, CInterfaceList<IUnkno CComPtr<ISubPicAllocatorPresenter> pCAP;
if(m_clsid == CLSID_VMR7AllocatorPresenter
- || m_clsid == CLSID_VMR9AllocatorPresenter
- || m_clsid == CLSID_DXRAllocatorPresenter
- || m_clsid == CLSID_madVRAllocatorPresenter
- || m_clsid == CLSID_EVRAllocatorPresenter
- || m_clsid == CLSID_SyncAllocatorPresenter)
+ || m_clsid == CLSID_VMR9AllocatorPresenter
+ || m_clsid == CLSID_DXRAllocatorPresenter
+ || m_clsid == CLSID_madVRAllocatorPresenter
+ || m_clsid == CLSID_EVRAllocatorPresenter
+ || m_clsid == CLSID_SyncAllocatorPresenter)
{
bool bFullscreen = (AfxGetApp()->m_pMainWnd != NULL) && (((CMainFrame*)AfxGetApp()->m_pMainWnd)->IsD3DFullScreenMode());
if(SUCCEEDED(CreateAP7(m_clsid, m_hWnd, &pCAP))
- || SUCCEEDED(CreateAP9(m_clsid, m_hWnd, bFullscreen, &pCAP))
- || SUCCEEDED(CreateEVR(m_clsid, m_hWnd, bFullscreen, &pCAP))
- || SUCCEEDED(CreateSyncRenderer(m_clsid, m_hWnd, bFullscreen, &pCAP)))
+ || SUCCEEDED(CreateAP9(m_clsid, m_hWnd, bFullscreen, &pCAP))
+ || SUCCEEDED(CreateEVR(m_clsid, m_hWnd, bFullscreen, &pCAP))
+ || SUCCEEDED(CreateSyncRenderer(m_clsid, m_hWnd, bFullscreen, &pCAP)))
{
CComPtr<IUnknown> pRenderer;
if(SUCCEEDED(hr = pCAP->CreateRenderer(&pRenderer)))
@@ -550,7 +550,7 @@ void CFGFilterList::Insert(CFGFilter* pFGF, int group, bool exactmatch, bool aut if(CFGFilterRegistry* f2r = dynamic_cast<CFGFilterRegistry*>(f2.pFGF))
{
if(f1r->GetMoniker() && f2r->GetMoniker() && S_OK == f1r->GetMoniker()->IsEqual(f2r->GetMoniker())
- || f1r->GetCLSID() != GUID_NULL && f1r->GetCLSID() == f2r->GetCLSID())
+ || f1r->GetCLSID() != GUID_NULL && f1r->GetCLSID() == f2r->GetCLSID())
{
TRACE(_T("FGM: Inserting %d %d %016I64x '%s' NOT!\n"),
group, exactmatch, pFGF->GetMerit(),
diff --git a/src/apps/mplayerc/FakeFilterMapper2.cpp b/src/apps/mplayerc/FakeFilterMapper2.cpp index 7cc958483..2c9c43bba 100644 --- a/src/apps/mplayerc/FakeFilterMapper2.cpp +++ b/src/apps/mplayerc/FakeFilterMapper2.cpp @@ -272,8 +272,8 @@ HRESULT WINAPI Mine_CoCreateInstance(IN REFCLSID rclsid, IN LPUNKNOWN pUnkOuter, */
if(!pUnkOuter)
if(rclsid == CLSID_VideoMixingRenderer || rclsid == CLSID_VideoMixingRenderer9
- || rclsid == CLSID_VideoRenderer || rclsid == CLSID_VideoRendererDefault
- || rclsid == CLSID_OverlayMixer)// || rclsid == CLSID_OverlayMixer2 - where is this declared?)
+ || rclsid == CLSID_VideoRenderer || rclsid == CLSID_VideoRendererDefault
+ || rclsid == CLSID_OverlayMixer)// || rclsid == CLSID_OverlayMixer2 - where is this declared?)
{
CMacrovisionKicker* pMK = DNew CMacrovisionKicker(NAME("CMacrovisionKicker"), NULL);
CComPtr<IUnknown> pUnk = (IUnknown*)(INonDelegatingUnknown*)pMK;
diff --git a/src/apps/mplayerc/FloatEdit.cpp b/src/apps/mplayerc/FloatEdit.cpp index 3c3d29656..4f4ca6326 100644 --- a/src/apps/mplayerc/FloatEdit.cpp +++ b/src/apps/mplayerc/FloatEdit.cpp @@ -141,7 +141,7 @@ END_MESSAGE_MAP() void CHexEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if(!(nChar >= 'A' && nChar <= 'F' || nChar >= 'a' && nChar <= 'f'
- || nChar >= '0' && nChar <= '9' || nChar == '\b'))
+ || nChar >= '0' && nChar <= '9' || nChar == '\b'))
return;
CString str;
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index b81c723f3..86a0ee436 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -9331,7 +9331,7 @@ void CMainFrame::RestoreDefaultWindowRect() w = s.fixedWindowSize.cx;
h = s.fixedWindowSize.cy;
}
- else
+ else
{
CRect r1, r2;
GetClientRect(&r1);
@@ -9346,7 +9346,7 @@ void CMainFrame::RestoreDefaultWindowRect() + r1.Width() - r2.Width();
h = _DEFCLIENTH + ((style&WS_THICKFRAME) ? GetSystemMetrics(SM_CYSIZEFRAME)*2 : 0)
+ r1.Height() - r2.Height();
-
+
if(style&WS_CAPTION)
{
h += GetSystemMetrics(SM_CYCAPTION);
@@ -9359,7 +9359,7 @@ void CMainFrame::RestoreDefaultWindowRect() x = s.rcLastWindowPos.TopLeft().x;
y = s.rcLastWindowPos.TopLeft().y;
}
- else
+ else
{
CRect r;
GetWindowRect(r);
@@ -9962,8 +9962,8 @@ void CMainFrame::ZoomVideoWindow(double scale) bool isSnapped = false;
if(s.fSnapToDesktopEdges) { // check if snapped to edges
- isSnapped = (r.left == mi.rcWork.left) || (r.top == mi.rcWork.top)
- || (r.right == mi.rcWork.right) || (r.bottom == mi.rcWork.bottom);
+ isSnapped = (r.left == mi.rcWork.left) || (r.top == mi.rcWork.top)
+ || (r.right == mi.rcWork.right) || (r.bottom == mi.rcWork.bottom);
}
if(isSnapped) // prefer left, top snap to right, bottom snap
diff --git a/src/apps/mplayerc/PPageAccelTbl.cpp b/src/apps/mplayerc/PPageAccelTbl.cpp index b93a64c02..c4f865ac1 100644 --- a/src/apps/mplayerc/PPageAccelTbl.cpp +++ b/src/apps/mplayerc/PPageAccelTbl.cpp @@ -134,7 +134,7 @@ CPPageAccelTbl::~CPPageAccelTbl() BOOL CPPageAccelTbl::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN
- && (pMsg->hwnd == m_WinLircEdit.m_hWnd || pMsg->hwnd == m_UIceEdit.m_hWnd))
+ && (pMsg->hwnd == m_WinLircEdit.m_hWnd || pMsg->hwnd == m_UIceEdit.m_hWnd))
{
OnApply();
return TRUE;
@@ -1584,8 +1584,8 @@ void CPPageAccelTbl::OnBeginlabeleditList(NMHDR* pNMHDR, LRESULT* pResult) return;
if(pItem->iSubItem == COL_MOD || pItem->iSubItem == COL_KEY || pItem->iSubItem == COL_TYPE
- || pItem->iSubItem == COL_MOUSE || pItem->iSubItem == COL_APPCMD
- || pItem->iSubItem == COL_RMCMD || pItem->iSubItem == COL_RMREPCNT)
+ || pItem->iSubItem == COL_MOUSE || pItem->iSubItem == COL_APPCMD
+ || pItem->iSubItem == COL_RMCMD || pItem->iSubItem == COL_RMREPCNT)
{
*pResult = TRUE;
}
diff --git a/src/apps/mplayerc/PPageBase.cpp b/src/apps/mplayerc/PPageBase.cpp index 0765f465a..12b0409f3 100644 --- a/src/apps/mplayerc/PPageBase.cpp +++ b/src/apps/mplayerc/PPageBase.cpp @@ -65,8 +65,8 @@ BOOL CPPageBase::PreTranslateMessage(MSG* pMsg) MSG msg;
memcpy(&msg, pMsg, sizeof(MSG));
for(HWND hWndParent = ::GetParent(msg.hwnd);
- hWndParent && hWndParent != m_hWnd;
- hWndParent = ::GetParent(hWndParent))
+ hWndParent && hWndParent != m_hWnd;
+ hWndParent = ::GetParent(hWndParent))
{
msg.hwnd = hWndParent;
}
diff --git a/src/apps/mplayerc/PPageFileInfoDetails.cpp b/src/apps/mplayerc/PPageFileInfoDetails.cpp index 5d43cac24..35e5f19fd 100644 --- a/src/apps/mplayerc/PPageFileInfoDetails.cpp +++ b/src/apps/mplayerc/PPageFileInfoDetails.cpp @@ -309,7 +309,7 @@ void CPPageFileInfoDetails::InitEncoding() CMediaTypeEx mt;
PIN_DIRECTION dir;
if(FAILED(pPin->QueryDirection(&dir)) || dir != PINDIR_OUTPUT
- || FAILED(pPin->ConnectionMediaType(&mt)))
+ || FAILED(pPin->ConnectionMediaType(&mt)))
continue;
CString str = mt.ToString();
diff --git a/src/apps/mplayerc/PPageFileMediaInfo.cpp b/src/apps/mplayerc/PPageFileMediaInfo.cpp index 085a047fe..89621ab55 100644 --- a/src/apps/mplayerc/PPageFileMediaInfo.cpp +++ b/src/apps/mplayerc/PPageFileMediaInfo.cpp @@ -70,7 +70,7 @@ static LRESULT CALLBACK ControlProc(HWND control, UINT message, WPARAM wParam, L {
if(message == WM_KEYDOWN) {
if ((LOWORD(wParam)== 'A' || LOWORD(wParam) == 'a')
- &&(GetKeyState(VK_CONTROL) < 0)) {
+ &&(GetKeyState(VK_CONTROL) < 0)) {
CEdit *pEdit = (CEdit*)CWnd::FromHandle(control);
pEdit->SetSel(0, pEdit->GetWindowTextLength(), TRUE);
return 0;
diff --git a/src/apps/mplayerc/PPageFormats.cpp b/src/apps/mplayerc/PPageFormats.cpp index 15ca29065..06b8094be 100644 --- a/src/apps/mplayerc/PPageFormats.cpp +++ b/src/apps/mplayerc/PPageFormats.cpp @@ -834,7 +834,7 @@ void CPPageFormats::OnLvnItemchangedList1(NMHDR *pNMHDR, LRESULT *pResult) LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
if(pNMLV->iItem >= 0 && pNMLV->iSubItem == COL_CATEGORY
- && (pNMLV->uChanged&LVIF_STATE) && (pNMLV->uNewState&LVIS_SELECTED))
+ && (pNMLV->uChanged&LVIF_STATE) && (pNMLV->uNewState&LVIS_SELECTED))
{
m_exts = AfxGetAppSettings().Formats[(int)m_list.GetItemData(pNMLV->iItem)].GetExtsWithPeriod();
UpdateData(FALSE);
diff --git a/src/apps/mplayerc/PPageFullscreen.cpp b/src/apps/mplayerc/PPageFullscreen.cpp index 6daba5f95..dcd759229 100644 --- a/src/apps/mplayerc/PPageFullscreen.cpp +++ b/src/apps/mplayerc/PPageFullscreen.cpp @@ -301,17 +301,17 @@ void CPPageFullscreen::ModesUpdate() m_dispmode29d97combo.AddString(str);
if(iSel_24 < 0 && dmtoset24.fValid && dm.size == dmtoset24.size
- && dm.bpp == dmtoset24.bpp && dm.freq == dmtoset24.freq) iSel_24 = j;
+ && dm.bpp == dmtoset24.bpp && dm.freq == dmtoset24.freq) iSel_24 = j;
if(iSel_25 < 0 && dmtoset25.fValid && dm.size == dmtoset25.size
- && dm.bpp == dmtoset25.bpp && dm.freq == dmtoset25.freq) iSel_25 = j;
+ && dm.bpp == dmtoset25.bpp && dm.freq == dmtoset25.freq) iSel_25 = j;
if(iSel_30 < 0 && dmtoset30.fValid && dm.size == dmtoset30.size
- && dm.bpp == dmtoset30.bpp && dm.freq == dmtoset30.freq) iSel_30 = j;
+ && dm.bpp == dmtoset30.bpp && dm.freq == dmtoset30.freq) iSel_30 = j;
if(iSel_Other < 0 && dmtosetOther.fValid && dm.size == dmtosetOther.size
- && dm.bpp == dmtosetOther.bpp && dm.freq == dmtosetOther.freq) iSel_Other = j;
+ && dm.bpp == dmtosetOther.bpp && dm.freq == dmtosetOther.freq) iSel_Other = j;
if(iSel_23 < 0 && dmtoset23.fValid && dm.size == dmtoset23.size
- && dm.bpp == dmtoset23.bpp && dm.freq == dmtoset23.freq) iSel_23 = j;
+ && dm.bpp == dmtoset23.bpp && dm.freq == dmtoset23.freq) iSel_23 = j;
if(iSel_29 < 0 && dmtoset29.fValid && dm.size == dmtoset29.size
- && dm.bpp == dmtoset29.bpp && dm.freq == dmtoset29.freq) iSel_29 = j;
+ && dm.bpp == dmtoset29.bpp && dm.freq == dmtoset29.freq) iSel_29 = j;
j++;
}
m_dispmode24combo.SetCurSel(iSel_24);
diff --git a/src/apps/mplayerc/PlayerCaptureDialog.cpp b/src/apps/mplayerc/PlayerCaptureDialog.cpp index e0362bbf3..b9a35af7e 100644 --- a/src/apps/mplayerc/PlayerCaptureDialog.cpp +++ b/src/apps/mplayerc/PlayerCaptureDialog.cpp @@ -195,7 +195,7 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo int iCount = 0, iSize;
if(SUCCEEDED(pAMSC->GetNumberOfCapabilities(&iCount, &iSize))
- && iSize == sizeof(T) && iCount > 0)
+ && iSize == sizeof(T) && iCount > 0)
{
for(int i = 0; i < iCount; i++)
{
@@ -216,7 +216,7 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo CFormatElem<T>* pfe = tfa[i]->GetAt(0);
if(pfe->mt.formattype != FORMAT_VideoInfo
- && pfe->mt.formattype != FORMAT_VideoInfo2)
+ && pfe->mt.formattype != FORMAT_VideoInfo2)
continue;
static SIZE presets[] =
@@ -242,13 +242,13 @@ static void SetupMediaTypes(IAMStreamConfig* pAMSC, CFormatArray<T>& tfa, CCombo for(int j = 0; j < countof(presets); j++)
{
if(presets[j].cx == bihCur.biWidth
- && presets[j].cy == abs(bihCur.biHeight)
- || presets[j].cx < pcaps->MinOutputSize.cx
- || presets[j].cx > pcaps->MaxOutputSize.cx
- || presets[j].cy < pcaps->MinOutputSize.cy
- || presets[j].cy > pcaps->MaxOutputSize.cy
- || presets[j].cx % pcaps->OutputGranularityX
- || presets[j].cy % pcaps->OutputGranularityY)
+ && presets[j].cy == abs(bihCur.biHeight)
+ || presets[j].cx < pcaps->MinOutputSize.cx
+ || presets[j].cx > pcaps->MaxOutputSize.cx
+ || presets[j].cy < pcaps->MinOutputSize.cy
+ || presets[j].cy > pcaps->MaxOutputSize.cy
+ || presets[j].cx % pcaps->OutputGranularityX
+ || presets[j].cy % pcaps->OutputGranularityY)
continue;
CMediaType mt = pfe->mt;
diff --git a/src/apps/mplayerc/PlayerListCtrl.cpp b/src/apps/mplayerc/PlayerListCtrl.cpp index 4f9ad23fb..64ee33969 100644 --- a/src/apps/mplayerc/PlayerListCtrl.cpp +++ b/src/apps/mplayerc/PlayerListCtrl.cpp @@ -57,9 +57,9 @@ BOOL CInPlaceEdit::PreTranslateMessage(MSG* pMsg) if(pMsg->message == WM_KEYDOWN)
{
if(pMsg->wParam == VK_RETURN
- || pMsg->wParam == VK_DELETE
- || pMsg->wParam == VK_ESCAPE
- || GetKeyState(VK_CONTROL))
+ || pMsg->wParam == VK_DELETE
+ || pMsg->wParam == VK_ESCAPE
+ || GetKeyState(VK_CONTROL))
{
::TranslateMessage(pMsg);
::DispatchMessage(pMsg);
@@ -177,7 +177,7 @@ BOOL CInPlaceComboBox::PreTranslateMessage(MSG* pMsg) if(pMsg->message == WM_KEYDOWN)
{
if(pMsg->wParam == VK_RETURN
- || pMsg->wParam == VK_ESCAPE)
+ || pMsg->wParam == VK_ESCAPE)
{
::TranslateMessage(pMsg);
::DispatchMessage(pMsg);
@@ -285,7 +285,7 @@ BOOL CInPlaceListBox::PreTranslateMessage(MSG* pMsg) if(pMsg->message == WM_KEYDOWN)
{
if(pMsg->wParam == VK_RETURN
- || pMsg->wParam == VK_ESCAPE)
+ || pMsg->wParam == VK_ESCAPE)
{
::TranslateMessage(pMsg);
::DispatchMessage(pMsg);
@@ -858,14 +858,14 @@ BOOL CPlayerListCtrl::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult) UINT nID = pNMHDR->idFrom;
if(pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND)
- || pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
+ || pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
{
// idFrom is actually the HWND of the tool
nID = ::GetDlgCtrlID((HWND)nID);
}
- if(nID == 0) // Notification in NT from automatically
- return FALSE; // created tooltip
+ if(nID == 0) // Notification in NT from automatically
+ return FALSE; // created tooltip
if(pNMHDR->code == TTN_NEEDTEXTA) pTTTA->lParam = (LPARAM)m_hWnd;
else if(pNMHDR->code == TTN_NEEDTEXTW) pTTTW->lParam = (LPARAM)m_hWnd;
diff --git a/src/apps/mplayerc/PlayerNavigationDialog.cpp b/src/apps/mplayerc/PlayerNavigationDialog.cpp index a1c6f03a5..282bd0da2 100644 --- a/src/apps/mplayerc/PlayerNavigationDialog.cpp +++ b/src/apps/mplayerc/PlayerNavigationDialog.cpp @@ -164,7 +164,7 @@ void CPlayerNavigationDialog::UpdateElementList() {
CDVBChannel& Channel = s.DVBChannels.GetNext(pos);
if ((m_bTVStations && (Channel.GetVideoPID() != 0)) ||
- (!m_bTVStations && (Channel.GetAudioCount() > 0)) && (Channel.GetVideoPID() == 0))
+ (!m_bTVStations && (Channel.GetAudioCount() > 0)) && (Channel.GetVideoPID() == 0))
{
nItem = m_ChannelList.AddString (Channel.GetName());
if (nItem < MAX_CHANNELS_ALLOWED)
diff --git a/src/apps/mplayerc/PlayerPlaylistBar.cpp b/src/apps/mplayerc/PlayerPlaylistBar.cpp index 9364bbafd..19dae4177 100644 --- a/src/apps/mplayerc/PlayerPlaylistBar.cpp +++ b/src/apps/mplayerc/PlayerPlaylistBar.cpp @@ -214,9 +214,9 @@ void CPlayerPlaylistBar::ResolveLinkFiles( CAtlList<CString> &fns ) CString& fn = fns.GetNext(pos);
TCHAR buff[_MAX_PATH];
if(CPath(fn).GetExtension().MakeLower() != _T(".lnk")
- || FAILED(pPF->Load(CStringW(fn), STGM_READ))
- || FAILED(pSL->Resolve(NULL, SLR_ANY_MATCH|SLR_NO_UI))
- || FAILED(pSL->GetPath(buff, countof(buff), NULL, 0)))
+ || FAILED(pPF->Load(CStringW(fn), STGM_READ))
+ || FAILED(pSL->Resolve(NULL, SLR_ANY_MATCH|SLR_NO_UI))
+ || FAILED(pSL->GetPath(buff, countof(buff), NULL, 0)))
continue;
fn = buff;
@@ -672,7 +672,7 @@ OpenMediaData* CPlayerPlaylistBar::GetCurOMD(REFERENCE_TIME rtStart) CString fn = CString(pli->m_fns.GetHead()).MakeLower();
if(fn.Find(_T("video_ts.ifo")) >= 0
- || fn.Find(_T(".ratdvd")) >= 0)
+ || fn.Find(_T(".ratdvd")) >= 0)
{
if(OpenDVDData* p = DNew OpenDVDData())
{
@@ -1175,7 +1175,7 @@ BOOL CPlayerPlaylistBar::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResul TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
if((pNMHDR->code == TTN_NEEDTEXTA && (HWND)pTTTA->lParam != m_list.m_hWnd)
- || (pNMHDR->code == TTN_NEEDTEXTW && (HWND)pTTTW->lParam != m_list.m_hWnd))
+ || (pNMHDR->code == TTN_NEEDTEXTW && (HWND)pTTTW->lParam != m_list.m_hWnd))
return FALSE;
int row = ((pNMHDR->idFrom-1) >> 10) & 0x3fffff;
diff --git a/src/apps/mplayerc/PlayerSubresyncBar.cpp b/src/apps/mplayerc/PlayerSubresyncBar.cpp index e46470af7..1bcb250fd 100644 --- a/src/apps/mplayerc/PlayerSubresyncBar.cpp +++ b/src/apps/mplayerc/PlayerSubresyncBar.cpp @@ -591,10 +591,10 @@ static bool ParseTime(CString str, int& ret, bool fWarn = true) h = abs(h);
if(n == 7
- && 0 <= h && h < 24
- && 0 <= m && m < 60
- && 0 <= s && s < 60
- && 0 <= ms && ms < 1000)
+ && 0 <= h && h < 24
+ && 0 <= m && m < 60
+ && 0 <= s && s < 60
+ && 0 <= ms && ms < 1000)
{
ret = sign*(h*60*60*1000+m*60*1000+s*1000+ms);
return(true);
@@ -614,9 +614,9 @@ void CPlayerSubresyncBar::OnBeginlabeleditList(NMHDR* pNMHDR, LRESULT* pResult) if(pItem->iItem >= 0)
{
if((pItem->iSubItem == COL_START || pItem->iSubItem == COL_END || pItem->iSubItem == COL_TEXT
- || pItem->iSubItem == COL_STYLE || pItem->iSubItem == COL_LAYER
- || pItem->iSubItem == COL_ACTOR || pItem->iSubItem == COL_EFFECT)
- && m_mode == TEXTSUB)
+ || pItem->iSubItem == COL_STYLE || pItem->iSubItem == COL_LAYER
+ || pItem->iSubItem == COL_ACTOR || pItem->iSubItem == COL_EFFECT)
+ && m_mode == TEXTSUB)
{
*pResult = TRUE;
}
@@ -638,9 +638,9 @@ void CPlayerSubresyncBar::OnDolabeleditList(NMHDR* pNMHDR, LRESULT* pResult) if(pItem->iItem >= 0)
{
if((pItem->iSubItem == COL_START || pItem->iSubItem == COL_END || pItem->iSubItem == COL_TEXT
- || pItem->iSubItem == COL_STYLE || pItem->iSubItem == COL_LAYER
- || pItem->iSubItem == COL_ACTOR || pItem->iSubItem == COL_EFFECT)
- && m_mode == TEXTSUB)
+ || pItem->iSubItem == COL_STYLE || pItem->iSubItem == COL_LAYER
+ || pItem->iSubItem == COL_ACTOR || pItem->iSubItem == COL_EFFECT)
+ && m_mode == TEXTSUB)
{
m_list.ShowInPlaceEdit(pItem->iItem, pItem->iSubItem);
*pResult = TRUE;
@@ -1207,8 +1207,8 @@ void CPlayerSubresyncBar::OnCustomdrawList(NMHDR* pNMHDR, LRESULT* pResult) COLORREF clrTextBk;
if((pLVCD->iSubItem == COL_START || pLVCD->iSubItem == COL_END || pLVCD->iSubItem == COL_TEXT || pLVCD->iSubItem == COL_STYLE
- || pLVCD->iSubItem == COL_LAYER || pLVCD->iSubItem == COL_ACTOR || pLVCD->iSubItem == COL_EFFECT)
- && m_mode == TEXTSUB)
+ || pLVCD->iSubItem == COL_LAYER || pLVCD->iSubItem == COL_ACTOR || pLVCD->iSubItem == COL_EFFECT)
+ && m_mode == TEXTSUB)
{
clrText = 0;
}
diff --git a/src/apps/mplayerc/Playlist.cpp b/src/apps/mplayerc/Playlist.cpp index 3d49a2863..f659db5e7 100644 --- a/src/apps/mplayerc/Playlist.cpp +++ b/src/apps/mplayerc/Playlist.cpp @@ -171,7 +171,7 @@ void CPlaylistItem::AutoLoadFiles() CString fullpath = path + fd.cFileName;
CString ext2 = fullpath.Mid(fullpath.ReverseFind('.')+1).MakeLower();
if(!FindFileInList(m_fns, fullpath) && ext != ext2
- && mf.FindExt(ext2, true) && mf.IsUsingEngine(fullpath, DirectShow))
+ && mf.FindExt(ext2, true) && mf.IsUsingEngine(fullpath, DirectShow))
{
m_fns.AddTail(fullpath);
}
diff --git a/src/apps/mplayerc/ShaderEditorDlg.cpp b/src/apps/mplayerc/ShaderEditorDlg.cpp index 60d1b0a57..14f088b36 100644 --- a/src/apps/mplayerc/ShaderEditorDlg.cpp +++ b/src/apps/mplayerc/ShaderEditorDlg.cpp @@ -74,10 +74,10 @@ CShaderEdit::~CShaderEdit() BOOL CShaderEdit::PreTranslateMessage(MSG* pMsg)
{
if(m_acdlg.IsWindowVisible()
- && pMsg->message == WM_KEYDOWN
- && (pMsg->wParam == VK_UP || pMsg->wParam == VK_DOWN
- || pMsg->wParam == VK_PRIOR || pMsg->wParam == VK_NEXT
- || pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE))
+ && pMsg->message == WM_KEYDOWN
+ && (pMsg->wParam == VK_UP || pMsg->wParam == VK_DOWN
+ || pMsg->wParam == VK_PRIOR || pMsg->wParam == VK_NEXT
+ || pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE))
{
int i = m_acdlg.m_list.GetCurSel();
@@ -301,7 +301,7 @@ END_MESSAGE_MAP() BOOL CShaderEditorDlg::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN
- && pMsg->hwnd == m_labels.m_edit.GetSafeHwnd())
+ && pMsg->hwnd == m_labels.m_edit.GetSafeHwnd())
{
OnCbnSelchangeCombo1();
diff --git a/src/apps/mplayerc/WebServer.cpp b/src/apps/mplayerc/WebServer.cpp index 98fc05478..90d24ebdf 100644 --- a/src/apps/mplayerc/WebServer.cpp +++ b/src/apps/mplayerc/WebServer.cpp @@ -102,7 +102,7 @@ CWebServer::CWebServer(CMainFrame* pMainFrame, int nPort) TCHAR ext[64];
ULONG len = countof(ext);
if(ERROR_SUCCESS == mime.Open(HKEY_CLASSES_ROOT, str + _T("\\") + buff, KEY_READ)
- && ERROR_SUCCESS == mime.QueryStringValue(_T("Extension"), ext, &len))
+ && ERROR_SUCCESS == mime.QueryStringValue(_T("Extension"), ext, &len))
m_mimes[CStringA(ext).MakeLower()] = CStringA(buff).MakeLower();
}
}
@@ -353,7 +353,7 @@ void CWebServer::OnRequest(CWebClientSocket* pClient, CStringA& hdr, CStringA& b CString redir;
if(pClient->m_get.Lookup(_T("redir"), redir)
- || pClient->m_post.Lookup(_T("redir"), redir))
+ || pClient->m_post.Lookup(_T("redir"), redir))
{
if(redir.IsEmpty()) redir = '/';
@@ -620,9 +620,9 @@ bool CWebServer::CallCGI(CWebClientSocket* pClient, CStringA& hdr, CStringA& bod if(hChildStdinRd && hChildStdoutWr)
if(CreateProcess(
- NULL, cmdln, NULL, NULL, TRUE, 0,
- envstr.GetLength() ? (LPVOID)(LPCSTR)envstr : NULL,
- dir, &siStartInfo, &piProcInfo))
+ NULL, cmdln, NULL, NULL, TRUE, 0,
+ envstr.GetLength() ? (LPVOID)(LPCSTR)envstr : NULL,
+ dir, &siStartInfo, &piProcInfo))
{
DWORD ThreadId;
CreateThread(NULL, 0, KillCGI, (LPVOID)piProcInfo.hProcess, 0, &ThreadId);
diff --git a/src/thirdparty/lcms2/src/cmslut.c b/src/thirdparty/lcms2/src/cmslut.c index 3f6dda9fe..a13827e57 100644 --- a/src/thirdparty/lcms2/src/cmslut.c +++ b/src/thirdparty/lcms2/src/cmslut.c @@ -252,6 +252,8 @@ cmsStage* CMSEXPORT cmsStageAllocToneCurves(cmsContext ContextID, cmsUInt32Numbe return NULL;
}
+ NewMPE ->Data = (void*) NewElem;
+
NewElem ->nCurves = nChannels;
NewElem ->TheCurves = (cmsToneCurve**) _cmsCalloc(ContextID, nChannels, sizeof(cmsToneCurve*));
if (NewElem ->TheCurves == NULL) {
@@ -274,8 +276,6 @@ cmsStage* CMSEXPORT cmsStageAllocToneCurves(cmsContext ContextID, cmsUInt32Numbe }
}
- NewMPE ->Data = (void*) NewElem;
-
return NewMPE;
}
@@ -526,7 +526,12 @@ cmsStage* CMSEXPORT cmsStageAllocCLut16bitGranular(cmsContext ContextID, if (NewMPE == NULL) return NULL;
NewElem = (_cmsStageCLutData*) _cmsMalloc(ContextID, sizeof(_cmsStageCLutData));
- if (NewElem == NULL) return NULL;
+ if (NewElem == NULL) {
+ cmsStageFree(NewMPE);
+ return NULL;
+ }
+
+ NewMPE ->Data = (void*) NewElem;
NewElem -> nEntries = n = outputChan * CubeSize(clutPoints, inputChan);
NewElem -> HasFloatValues = FALSE;
@@ -549,8 +554,6 @@ cmsStage* CMSEXPORT cmsStageAllocCLut16bitGranular(cmsContext ContextID, return NULL;
}
- NewMPE ->Data = (void*) NewElem;
-
return NewMPE;
}
@@ -601,7 +604,12 @@ cmsStage* CMSEXPORT cmsStageAllocCLutFloatGranular(cmsContext ContextID, const c NewElem = (_cmsStageCLutData*) _cmsMalloc(ContextID, sizeof(_cmsStageCLutData));
- if (NewElem == NULL) return NULL;
+ if (NewElem == NULL) {
+ cmsStageFree(NewMPE);
+ return NULL;
+ }
+
+ NewMPE ->Data = (void*) NewElem;
NewElem -> nEntries = n = outputChan * CubeSize( clutPoints, inputChan);
NewElem -> HasFloatValues = TRUE;
@@ -618,8 +626,7 @@ cmsStage* CMSEXPORT cmsStageAllocCLutFloatGranular(cmsContext ContextID, const c }
}
- NewMPE ->Data = (void*) NewElem;
-
+
NewElem ->Params = _cmsComputeInterpParamsEx(ContextID, clutPoints, inputChan, outputChan, NewElem ->Tab.TFloat, CMS_LERP_FLAGS_FLOAT);
if (NewElem ->Params == NULL) {
cmsStageFree(NewMPE);
diff --git a/src/thirdparty/lcms2/src/cmstypes.c b/src/thirdparty/lcms2/src/cmstypes.c index 6ab69e6b2..27c317ac9 100644 --- a/src/thirdparty/lcms2/src/cmstypes.c +++ b/src/thirdparty/lcms2/src/cmstypes.c @@ -2039,10 +2039,17 @@ void *Type_LUT16_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cm T = (cmsUInt16Number*) _cmsCalloc(self ->ContextID, nTabSize, sizeof(cmsUInt16Number));
if (T == NULL) goto Error;
- if (!_cmsReadUInt16Array(io, nTabSize, T)) goto Error;
+ if (!_cmsReadUInt16Array(io, nTabSize, T)) {
+ _cmsFree(self ->ContextID, T);
+ goto Error;
+ }
mpeclut = cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T);
- if (mpeclut == NULL) goto Error;
+ if (mpeclut == NULL) {
+ _cmsFree(self ->ContextID, T);
+ goto Error;
+ }
+
cmsPipelineInsertStage(NewLUT, cmsAT_END, mpeclut);
_cmsFree(self ->ContextID, T);
}
|