aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-03-21 09:29:31 +0100
committerMax Kellermann <max@duempel.org>2012-03-21 10:33:43 +0100
commit777e1cabc591a146be2c60129b87689021acf3c3 (patch)
tree25690a8c9d31ade06217999f5804a8f2e9cba978
parent396e97fc94d37ac356ba04f9b8623e997e54b9a7 (diff)
downloadmpd-777e1cabc591a146be2c60129b87689021acf3c3.tar.gz
mpd-777e1cabc591a146be2c60129b87689021acf3c3.tar.xz
mpd-777e1cabc591a146be2c60129b87689021acf3c3.zip
test/run_convert: allow the out format to be a mask
-rw-r--r--test/run_convert.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/run_convert.c b/test/run_convert.c
index bc95d959f..4f57400fd 100644
--- a/test/run_convert.c
+++ b/test/run_convert.c
@@ -76,13 +76,17 @@ int main(int argc, char **argv)
return 1;
}
- if (!audio_format_parse(&out_audio_format, argv[2],
- false, &error)) {
+ struct audio_format out_audio_format_mask;
+ if (!audio_format_parse(&out_audio_format_mask, argv[2],
+ true, &error)) {
g_printerr("Failed to parse audio format: %s\n",
error->message);
return 1;
}
+ out_audio_format = in_audio_format;
+ audio_format_mask_apply(&out_audio_format, &out_audio_format_mask);
+
const size_t in_frame_size = audio_format_frame_size(&in_audio_format);
pcm_convert_init(&state);