channels/rdpsnd: fix potential uninitialized value

This commit is contained in:
Marc-André Moreau 2013-05-25 15:49:44 -04:00
parent e9d362b58e
commit e45f149db4

View File

@ -199,17 +199,15 @@ void rdpsnd_send_client_audio_formats(rdpsndPlugin* rdpsnd)
UINT16 wNumberOfFormats;
AUDIO_FORMAT* clientFormat;
dwVolumeLeft = ((50 * 0xFFFF) / 100); /* 50% */
dwVolumeRight = ((50 * 0xFFFF) / 100); /* 50% */
dwVolume = (dwVolumeLeft << 16) | dwVolumeRight;
if (rdpsnd->device)
{
if (rdpsnd->device->GetVolume)
dwVolume = rdpsnd->device->GetVolume(rdpsnd->device);
}
else
{
dwVolumeLeft = ((50 * 0xFFFF) / 100); /* 50% */
dwVolumeRight = ((50 * 0xFFFF) / 100); /* 50% */
dwVolume = (dwVolumeLeft << 16) | dwVolumeRight;
}
wNumberOfFormats = rdpsnd->NumberOfClientFormats;