diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-06-18 23:44:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-06-18 23:44:26 +0200 |
commit | c2fa11e179eb65b09eb1a7629f01d97fe44273aa (patch) | |
tree | f87068c0791bb11c51f95e8ab66a876e81a72c47 /src/pulsecore | |
parent | 132e73b2efbda60919db355d6baa3d9687103e0f (diff) |
make user of pa_channel_map_init_extend() wherever it makes sense
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/core-scache.c | 3 | ||||
-rw-r--r-- | src/pulsecore/sound-file.c | 5 |
2 files changed, 2 insertions, 6 deletions
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"); |