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
path: root/src
diff options
context:
space:
mode:
authorkasper93 <kasper93@gmail.com>2013-09-12 22:07:15 +0400
committerkasper93 <kasper93@gmail.com>2013-10-20 03:17:16 +0400
commitb8e82fb73dcfc3aa10a0a166e89021735ef0d9a6 (patch)
tree7924e8f61eebbeefd346e2ba1b6969fc4bf062a0 /src
parentb35f9847e77aaf3cd9fa0789f0a730bb7bc6b155 (diff)
Fix integer overflow
Fixes CID #966079, #966078
Diffstat (limited to 'src')
-rw-r--r--src/filters/renderer/VideoRenderers/SyncRenderer.cpp4
-rw-r--r--src/mpc-hc/MainFrm.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
index 2351e0a79..66d939040 100644
--- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
+++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
@@ -3702,10 +3702,10 @@ void CSyncAP::RenderThread()
if ((m_lShiftToNearestPrev - m_lShiftToNearest) > lDisplayCycle2) { // If a step down in the m_lShiftToNearest function. Display slower than video.
m_bVideoSlowerThanDisplay = false;
- m_llHysteresis = -(LONGLONG)(10000 * lDisplayCycle4);
+ m_llHysteresis = -(LONGLONG)lDisplayCycle4 * 10000;
} else if ((m_lShiftToNearest - m_lShiftToNearestPrev) > lDisplayCycle2) { // If a step up
m_bVideoSlowerThanDisplay = true;
- m_llHysteresis = (LONGLONG)(10000 * lDisplayCycle4);
+ m_llHysteresis = (LONGLONG)lDisplayCycle4 * 10000;
} else if ((m_lShiftToNearest < (3 * lDisplayCycle4)) && (m_lShiftToNearest > lDisplayCycle4)) {
m_llHysteresis = 0; // Reset when between 1/4 and 3/4 of the way either way
}
diff --git a/src/mpc-hc/MainFrm.cpp b/src/mpc-hc/MainFrm.cpp
index 0fb7e1cba..ca6ef225e 100644
--- a/src/mpc-hc/MainFrm.cpp
+++ b/src/mpc-hc/MainFrm.cpp
@@ -15345,7 +15345,7 @@ void CMainFrame::ProcessAPICommand(COPYDATASTRUCT* pCDS)
m_OSD.DisplayMessage(OSD_TOPLEFT, m_wndStatusBar.GetStatusTimer(), 2000);
break;
case CMD_SETAUDIODELAY:
- rtPos = _wtol((LPCWSTR)pCDS->lpData) * 10000;
+ rtPos = (REFERENCE_TIME)_wtol((LPCWSTR)pCDS->lpData) * 10000;
SetAudioDelay(rtPos);
break;
case CMD_SETSUBTITLEDELAY: