From: David Henningsson Date: Tue, 18 Mar 2014 22:07:19 +0000 (+0100) Subject: route: Return NULL in case of zero found channels in determine_chmap X-Git-Tag: v1.0.28~17 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=d794af65e97822a29945a21c1cd2a21ea3b8e6b8;p=alsa-lib.git 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 Signed-off-by: Takashi Iwai --- 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;