diff options
author | Max Kellermann <max@musicpd.org> | 2016-10-28 21:46:20 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-10-28 22:36:04 +0200 |
commit | 13001c018c49931e258104c3e8fffa97fb3bb374 (patch) | |
tree | 0c12e356b016553c99739bb6cdffb9bbc9e50e58 /test/run_encoder.cxx | |
parent | 1b39efb694fa1ff9924ef52e93c19b39a54e293f (diff) |
AudioParser: throw exception on error
Diffstat (limited to 'test/run_encoder.cxx')
-rw-r--r-- | test/run_encoder.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/run_encoder.cxx b/test/run_encoder.cxx index 5775a9b25..78dd093eb 100644 --- a/test/run_encoder.cxx +++ b/test/run_encoder.cxx @@ -72,12 +72,8 @@ int main(int argc, char **argv) /* open the encoder */ AudioFormat audio_format(44100, SampleFormat::S16, 2); - if (argc > 2) { - if (!audio_format_parse(audio_format, argv[2], false, error)) { - LogError(error, "Failed to parse audio format"); - return EXIT_FAILURE; - } - } + if (argc > 2) + audio_format = ParseAudioFormat(argv[2], false); std::unique_ptr<Encoder> encoder(p_encoder->Open(audio_format, error)); if (encoder == nullptr) { |