winepulse: Avoid 32-bit calculation with 64-bit result (Coverity).

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
André Hentschel 2015-11-16 22:36:00 +01:00 committed by Alexandre Julliard
parent ff6225c16d
commit 005ff50252
1 changed files with 2 additions and 3 deletions

View File

@ -2239,10 +2239,9 @@ static HRESULT WINAPI AudioClock_GetFrequency(IAudioClock *iface, UINT64 *freq)
pthread_mutex_lock(&pulse_lock);
hr = pulse_stream_valid(This);
if (SUCCEEDED(hr)) {
*freq = This->ss.rate;
if (This->share == AUDCLNT_SHAREMODE_SHARED)
*freq = This->ss.rate * pa_frame_size(&This->ss);
else
*freq = This->ss.rate;
*freq *= pa_frame_size(&This->ss);
}
pthread_mutex_unlock(&pulse_lock);
return hr;