From c79fd237d54e194626d3b7add4d4ae25bb31eb97 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 13 Jan 2010 07:16:32 +0100 Subject: [PATCH] alsa: Ignore errors from the btr query. Just use default values in case samplerate and channels can not be obtained from parent nodes of the buffer tree. --- alsa_write.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/alsa_write.c b/alsa_write.c index 658183ea..11fc58a4 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -332,17 +332,13 @@ again: pad->channels = conf->channels_arg; if (!conf->samplerate_given) { /* config option trumps btr_exec */ int32_t rate; - ret = get_btr_samplerate(btrn, &rate); - if (ret < 0) - goto err; - pad->samplerate = rate; + if (get_btr_samplerate(btrn, &rate) >= 0) + pad->samplerate = rate; } if (!conf->channels_given) { int32_t ch; - ret = get_btr_channels(btrn, &ch); - if (ret < 0) - goto err; - pad->channels = ch; + if (get_btr_channels(btrn, &ch) >= 0) + pad->channels = ch; } PARA_INFO_LOG("%d channel(s), %dHz\n", pad->channels, pad->samplerate); ret = 1; -- 2.39.5