summaryrefslogtreecommitdiff
path: root/src/pulsecore/source-output.c
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2016-01-07 15:25:41 +0200
committerArun Raghavan <git@arunraghavan.net>2016-01-22 13:25:29 +0530
commit6a754ad4a975de8f7b4d6520a6f6c5f43f6f786b (patch)
tree8da4677c2de50a49614c0dc7fd91f41c5fe97833 /src/pulsecore/source-output.c
parentb2e7cf65212a1abfbff282965e582f8fc56a964a (diff)
downloadpulseaudio-6a754ad4a975de8f7b4d6520a6f6c5f43f6f786b.tar.gz
source-output: remap volume_factor_source when starting move
This gets rid of an error message from the debug log. If volume_factor_source would actually be used somewhere, this bug would have caused more severe problems. volume_factor_source should have the source's channel map. When moving the stream, the volume needs to be remapped from the old source's channel map to the new source's map. However, when the stream is being moved, there is a period where the old source has already been forgotten and the new source isn't yet known, so the remapping can't be done directly between the two channel maps. Instead, the volume is remapped from the old source's map to the stream's own map when the move starts, and again remapped from the stream's map to the new source's map when the move finishes. The first remapping was missing, causing the second remapping fail and print an error to the log. (I checked the sink input code as well. It didn't have this bug.)
Diffstat (limited to 'src/pulsecore/source-output.c')
-rw-r--r--src/pulsecore/source-output.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 66a0341de..9217ad462 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -1244,6 +1244,9 @@ int pa_source_output_start_move(pa_source_output *o) {
pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_REMOVE_OUTPUT, o, 0, NULL) == 0);
pa_source_update_status(o->source);
+
+ pa_cvolume_remap(&o->volume_factor_source, &o->source->channel_map, &o->channel_map);
+
o->source = NULL;
pa_source_output_unref(o);