ac3dec: Show usage if no parameter is passed

When ac3dec is called without any argument the application hangs forever.

Instead of hanging, print the usage and exit.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Fabio Estevam 2012-11-13 10:08:14 -02:00 committed by Takashi Iwai
parent e875fa883d
commit 848e26d10e

View file

@ -130,6 +130,11 @@ int main(int argc,char *argv[])
out_config.spdif = SPDIF_NONE;
out_config.hdmi = 0;
if (isatty(fileno(stdin)) && (argc == 1)) {
help();
return 1;
}
morehelp = 0;
while (1) {
int c;