summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2011-10-05 11:15:53 +0200
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-10-08 15:17:49 +0530
commit346fd7066c560eed52e4c4a2293266366122e120 (patch)
treee24b6fb773b803c11295dbd6750f5b572a9f38ae
parent17875ecd5c7e182e59a9e15570e0d512aaf31529 (diff)
source-output: Do not use unset channel map in pa_source_output_new
This problem was found when tracing down a crash coming from the esound protocol, which does not set a channel map. BugLink: http://bugs.launchpad.net/bugs/864071 Signed-off-by: David Henningsson <david.henningsson@canonical.com> N.B.: As Colin notes, this is because commit 117c7145 was incomplete ("format: Fix channel map handling")
-rw-r--r--src/pulsecore/source-output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 1e08a03f..091d7f98 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -243,7 +243,8 @@ int pa_source_output_new(
* to using the sample spec and channel map after all decisions w.r.t.
* routing are complete. */
pa_idxset *tmp = pa_idxset_new(NULL, NULL);
- pa_format_info *f = pa_format_info_from_sample_spec(&data->sample_spec, &data->channel_map);
+ pa_format_info *f = pa_format_info_from_sample_spec(&data->sample_spec,
+ data->channel_map_is_set ? &data->channel_map : NULL);
pa_idxset_put(tmp, f, NULL);
pa_source_output_new_data_set_formats(data, tmp);
}