summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/resampler.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-02-13 22:13:44 +0000
committerLennart Poettering <lennart@poettering.net>2008-02-13 22:13:44 +0000
commit86b9ef8c961bed9d3a65f044741bb423c26d8005 (patch)
tree4f588c2d88c235374ba5e3766f7e3350394f2acd /src/pulsecore/resampler.c
parenta3e820fca7e264037adf525a8af8894190f25ec7 (diff)
deal with a possibly failing pa_channel_map_init_auto() correctly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2105 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/resampler.c')
-rw-r--r--src/pulsecore/resampler.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 40fc2800..fe7f1ad2 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -217,13 +217,13 @@ pa_resampler* pa_resampler_new(
if (am)
r->i_cm = *am;
- else
- pa_channel_map_init_auto(&r->i_cm, r->i_ss.channels, PA_CHANNEL_MAP_DEFAULT);
+ else if (!pa_channel_map_init_auto(&r->i_cm, r->i_ss.channels, PA_CHANNEL_MAP_DEFAULT))
+ goto fail;
if (bm)
r->o_cm = *bm;
- else
- pa_channel_map_init_auto(&r->o_cm, r->o_ss.channels, PA_CHANNEL_MAP_DEFAULT);
+ else if (!pa_channel_map_init_auto(&r->o_cm, r->o_ss.channels, PA_CHANNEL_MAP_DEFAULT))
+ goto fail;
r->i_fz = pa_frame_size(a);
r->o_fz = pa_frame_size(b);