AudioParser: throw exception on error

This commit is contained in:
Max Kellermann
2016-10-28 21:46:20 +02:00
parent 1b39efb694
commit 13001c018c
11 changed files with 80 additions and 164 deletions

View File

@@ -175,12 +175,8 @@ try {
/* parse the audio format */
if (argc > 3) {
if (!audio_format_parse(audio_format, argv[3], false, error)) {
LogError(error, "Failed to parse audio format");
return EXIT_FAILURE;
}
}
if (argc > 3)
audio_format = ParseAudioFormat(argv[3], false);
/* do it */