summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <lk@Ubuntu-12.04-32bit>2014-10-06 19:43:52 -0700
committerLaxmikant Rashinkar <lk@Ubuntu-12.04-32bit>2014-10-06 19:43:52 -0700
commitc0839cd6a5a5e98d5975e169dd5f186bc9d008fe (patch)
tree815da7a9eaa437ffc8e49d178479ff1fdf30510d /sesman/chansrv
parentc3236e48a4c798c21dcf18a9f272c6d53fe80c8a (diff)
downloadxrdp-proprietary-c0839cd6a5a5e98d5975e169dd5f186bc9d008fe.tar.gz
xrdp-proprietary-c0839cd6a5a5e98d5975e169dd5f186bc9d008fe.zip
when closing audio source, don't flush audio data if audio buffer is empty
Diffstat (limited to 'sesman/chansrv')
-rw-r--r--sesman/chansrv/sound.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c
index 48bb871e..f5e17fef 100644
--- a/sesman/chansrv/sound.c
+++ b/sesman/chansrv/sound.c
@@ -493,10 +493,13 @@ sound_send_close(void)
LOG(10, ("sound_send_close:"));
/* send any left over data */
- if (sound_send_wave_data_chunk(g_buffer, g_buf_index) != 0)
+ if (g_buf_index)
{
- LOG(10, ("sound_send_close: sound_send_wave_data_chunk failed"));
- return 1;
+ if (sound_send_wave_data_chunk(g_buffer, g_buf_index) != 0)
+ {
+ LOG(10, ("sound_send_close: sound_send_wave_data_chunk failed"));
+ return 1;
+ }
}
g_buf_index = 0;
g_memset(g_sent_flag, 0, sizeof(g_sent_flag));