summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2014-03-18 23:07:19 +0100
committerTakashi Iwai <tiwai@suse.de>2014-03-19 10:40:44 +0100
commitd794af65e97822a29945a21c1cd2a21ea3b8e6b8 (patch)
tree99b1ef850164fd014d766339ad05d0fc78326bab
parent5b72e3d5305930bffc300aa4f2545ba95992c144 (diff)
downloadalsa-lib-d794af65e97822a29945a21c1cd2a21ea3b8e6b8.tar.gz
route: Return NULL in case of zero found channels in determine_chmap
This should fix the problem where the old route syntax can no longer be opened. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--src/pcm/pcm_route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
index ac11bdc8..a9097caa 100644
--- a/src/pcm/pcm_route.c
+++ b/src/pcm/pcm_route.c
@@ -883,7 +883,10 @@ static int determine_chmap(snd_config_t *tt, snd_pcm_chmap_t **tt_chmap)
}
}
-
+ if (chmap->channels == 0) {
+ free(chmap);
+ chmap = NULL;
+ }
*tt_chmap = chmap;
return 0;