diff options
author | Marc-André Moreau <marcandre.moreau@gmail.com> | 2013-05-25 15:49:44 -0400 |
---|---|---|
committer | Marc-André Moreau <marcandre.moreau@gmail.com> | 2013-05-25 15:49:44 -0400 |
commit | e45f149db43c2606613fe4cab3f64e5e590b68f8 (patch) | |
tree | a5f35bdca0d45063356b406876130f00b4fa6035 /channels | |
parent | e9d362b58ea6cb29ae48a65388e80c1991034f29 (diff) | |
download | freerdp-e45f149db43c2606613fe4cab3f64e5e590b68f8.tar.gz freerdp-e45f149db43c2606613fe4cab3f64e5e590b68f8.tar.bz2 freerdp-e45f149db43c2606613fe4cab3f64e5e590b68f8.zip |
channels/rdpsnd: fix potential uninitialized value
Diffstat (limited to 'channels')
-rw-r--r-- | channels/rdpsnd/client/rdpsnd_main.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index e895b9901..35ba973d7 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -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; |