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>
This commit is contained in:
David Henningsson 2014-03-18 23:07:19 +01:00 committed by Takashi Iwai
parent 5b72e3d530
commit d794af65e9

View 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; *tt_chmap = chmap;
return 0; return 0;