]> git.alsa-project.org Git - alsa-lib.git/commitdiff
route: Return NULL in case of zero found channels in determine_chmap
authorDavid Henningsson <david.henningsson@canonical.com>
Tue, 18 Mar 2014 22:07:19 +0000 (23:07 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 19 Mar 2014 09:40:44 +0000 (10:40 +0100)
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>
src/pcm/pcm_route.c

index ac11bdc8adfdd0e272dcbf3d0cfad9d8acf9323e..a9097caa7303dd8eb1610778e260946762b45ea8 100644 (file)
@@ -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;