summaryrefslogtreecommitdiff
path: root/src/pulse
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>2013-11-25 14:59:44 +0200
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-01-08 21:26:39 +0200
commit3a5a0f6652c749f42ba3757fd563a3ff7b6b35af (patch)
tree16baf2263bfb4ecd1e9a2ebd9c52897314ea5f4f /src/pulse
parent066dd942aa1855f1a05d1352b13dd540fa0c033f (diff)
core-format: Add pa_format_info_get_channel_map()
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/format.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/pulse/format.c b/src/pulse/format.c
index 424df0e69..4f4b3425d 100644
--- a/src/pulse/format.c
+++ b/src/pulse/format.c
@@ -218,7 +218,6 @@ pa_format_info* pa_format_info_from_sample_spec(pa_sample_spec *ss, pa_channel_m
/* For PCM streams */
int pa_format_info_to_sample_spec(pa_format_info *f, pa_sample_spec *ss, pa_channel_map *map) {
- char *m = NULL;
int ret = -PA_ERR_INVALID;
pa_assert(f);
@@ -233,21 +232,12 @@ int pa_format_info_to_sample_spec(pa_format_info *f, pa_sample_spec *ss, pa_chan
goto out;
if (pa_format_info_get_channels(f, &ss->channels) < 0)
goto out;
-
- if (map) {
- pa_channel_map_init(map);
-
- if (pa_format_info_get_prop_string(f, PA_PROP_FORMAT_CHANNEL_MAP, &m) == 0)
- if (pa_channel_map_parse(map, m) == NULL)
- goto out;
- }
+ if (map && pa_format_info_get_channel_map(f, map) < 0)
+ goto out;
ret = 0;
out:
- if (m)
- pa_xfree(m);
-
return ret;
}