From c2fa11e179eb65b09eb1a7629f01d97fe44273aa Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 18 Jun 2008 23:44:26 +0200 Subject: make user of pa_channel_map_init_extend() wherever it makes sense --- src/pulsecore/core-scache.c | 3 +-- src/pulsecore/sound-file.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/pulsecore') diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c index ed3758f0..75fa2ff1 100644 --- a/src/pulsecore/core-scache.c +++ b/src/pulsecore/core-scache.c @@ -162,8 +162,7 @@ int pa_scache_add_item( pa_assert(!map || (pa_channel_map_valid(map) && ss && ss->channels == map->channels)); if (ss && !map) - if (!(map = pa_channel_map_init_auto(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT))) - return -1; + pa_channel_map_init_extend(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT); if (chunk && chunk->length > PA_SCACHE_ENTRY_SIZE_MAX) return -1; diff --git a/src/pulsecore/sound-file.c b/src/pulsecore/sound-file.c index 57c17760..3183ede6 100644 --- a/src/pulsecore/sound-file.c +++ b/src/pulsecore/sound-file.c @@ -117,10 +117,7 @@ int pa_sound_file_load( } if (map) - if (!pa_channel_map_init_auto(map, ss->channels, PA_CHANNEL_MAP_DEFAULT)) { - pa_log("Unsupported channel map in file %s", fname); - goto finish; - } + pa_channel_map_init_extend(map, ss->channels, PA_CHANNEL_MAP_DEFAULT); if ((l = pa_frame_size(ss) * sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) { pa_log("File too large"); -- cgit