From 9526fdbe730edb4b095a1e12aade0e16f1da2292 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 21 Oct 2009 23:01:04 +0200 Subject: audio_format: wildcards allowed in audio_format configuration An asterisk means that this attribute should not be enforced, and stays whatever it used to be. This way, some configuration values work like masks. --- src/output/shout_plugin.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/output/shout_plugin.c') diff --git a/src/output/shout_plugin.c b/src/output/shout_plugin.c index f1b21bb36..da90efd2d 100644 --- a/src/output/shout_plugin.c +++ b/src/output/shout_plugin.c @@ -126,6 +126,13 @@ my_shout_init_driver(const struct audio_format *audio_format, struct block_param *block_param; int public; + if (audio_format == NULL || + !audio_format_fully_defined(audio_format)) { + g_set_error(error, shout_output_quark(), 0, + "Need full audio format specification"); + return NULL; + } + sd = new_shout_data(); if (shout_init_count == 0) @@ -191,8 +198,6 @@ my_shout_init_driver(const struct audio_format *audio_format, } } - check_block_param("format"); - encoding = config_get_block_string(param, "encoding", "ogg"); encoder_plugin = shout_encoder_plugin_get(encoding); if (encoder_plugin == NULL) { -- cgit v1.2.3