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: Lukáš Krejčí <lskrejci@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
13e11d3fcb
commit
1d9a3f6d12
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue