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.
This commit is contained in:
Chris Billington 2016-01-23 12:31:33 +11:00 committed by Arun Raghavan
parent e3148f9ac2
commit d2d3d0e141

View file

@ -2637,6 +2637,8 @@ int pa_source_set_port(pa_source *s, const char *name, bool save) {
s->active_port = port; s->active_port = port;
s->save_port = save; 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); pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PORT_CHANGED], s);
return 0; return 0;