Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/NeutrinoRDP.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-11-03 11:06:07 +0300
committerJay Sorg <jay.sorg@gmail.com>2014-11-03 11:06:07 +0300
commit095d0a0aeffefd8671261c7cc04f4d1ce39dc91b (patch)
tree013e333073ee88cafccaa8d5a63b532c9e430017
parent8822bb4ad1483d6d8f1d7eaf7e68f73facee0da8 (diff)
rdpsnd: fix mem leak and lower pulse record latency
-rw-r--r--channels/rdpsnd/pulse/rdpsnd_pulse.c4
-rw-r--r--channels/rdpsnd/rdpsnd_main.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/channels/rdpsnd/pulse/rdpsnd_pulse.c b/channels/rdpsnd/pulse/rdpsnd_pulse.c
index 738b452..0610907 100644
--- a/channels/rdpsnd/pulse/rdpsnd_pulse.c
+++ b/channels/rdpsnd/pulse/rdpsnd_pulse.c
@@ -587,8 +587,8 @@ static int rdpsnd_pulse_rec_open(rdpsndDevicePlugin* device,
buffer_attr.prebuf = (uint32_t) -1;
buffer_attr.minreq = (uint32_t) -1;
- /* 500ms latency */
- buffer_attr.fragsize = pa_usec_to_bytes(500000, &pulse->rec_sample_spec);
+ /* 100ms latency */
+ buffer_attr.fragsize = pa_usec_to_bytes(100000, &pulse->rec_sample_spec);
if (pa_stream_connect_record(pulse->rec_stream,
pulse->rec_device_name[0] ? pulse->rec_device_name : NULL,
diff --git a/channels/rdpsnd/rdpsnd_main.c b/channels/rdpsnd/rdpsnd_main.c
index 4687d2f..03125d7 100644
--- a/channels/rdpsnd/rdpsnd_main.c
+++ b/channels/rdpsnd/rdpsnd_main.c
@@ -183,6 +183,10 @@ static void rdpsnd_process_interval(rdpSvcPlugin* plugin)
stream_set_pos(out, 4 + len);
svc_plugin_send((rdpSvcPlugin*) plugin, out);
}
+ else
+ {
+ stream_free(out);
+ }
rdpsnd->plugin.interval_ms = 10;
}