Commit 1d9a3f6d authored by Lukáš Krejčí's avatar Lukáš Krejčí Committed by Alexandre Julliard

mciqtz32: Don't overflow seek times during multiplication.

Seek times are of type REFERENCE_TIME (64-bit), but the multiplication is done in DWORD (32-bit). Signed-off-by: 's avatarLukáš Krejčí <lskrejci@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 13e11d3f
......@@ -422,20 +422,19 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
wma->mci_flags = dwFlags;
IMediaSeeking_GetTimeFormat(wma->seek, &format);
if (dwFlags & MCI_FROM) {
wma->seek_start = lpParms->dwFrom;
if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME))
wma->seek_start = lpParms->dwFrom * 10000;
else
wma->seek_start = lpParms->dwFrom;
wma->seek_start *= 10000;
start_flags = AM_SEEKING_AbsolutePositioning;
} else {
wma->seek_start = 0;
start_flags = AM_SEEKING_NoPositioning;
}
if (dwFlags & MCI_TO) {
wma->seek_stop = lpParms->dwTo;
if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME))
wma->seek_stop = lpParms->dwTo * 10000;
else
wma->seek_stop = lpParms->dwTo;
wma->seek_stop *= 10000;
} else {
wma->seek_stop = 0;
IMediaSeeking_GetDuration(wma->seek, &wma->seek_stop);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment