summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Billington <chrisjbillington@gmail.com>2016-01-23 12:31:33 +1100
committerArun Raghavan <arun@arunraghavan.net>2016-06-22 21:04:47 +0530
commitd2d3d0e141f5fc83301632c30af63231be00886a (patch)
treecc321c840265fabeca46572064f2fd9b73e81ebe /src
parente3148f9ac291baba1efa1ef22adc274283e375fa (diff)
source: Fixed bug: pa_source_set_port() did not update the latency_offset.
Unlike pa_sink_set_port(), which calls pa_sink_set_latency_offset() to update the latency offset of the sink to match that of its newly set port, pa_source_set_port() did not do so. This patch adds the appropriate call to pa_source_set_latency_offset() in pa_source_set_port() to fix this.
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/source.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 8a527d8a9..ee774250d 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -2637,6 +2637,8 @@ int pa_source_set_port(pa_source *s, const char *name, bool save) {
s->active_port = port;
s->save_port = save;
+ pa_source_set_latency_offset(s, s->active_port->latency_offset);
+
pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PORT_CHANGED], s);
return 0;