aboutsummaryrefslogtreecommitdiffstats
path: root/src/FilterConfig.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-04 13:38:13 +0200
committerMax Kellermann <max@duempel.org>2013-08-04 14:07:50 +0200
commitf54bcc1f16f815fb507ac8a8ffd7913f686969d2 (patch)
tree94bfc2ab6640e54fd28e2518c7820ccb89933d7a /src/FilterConfig.cxx
parentca0d09c50fc4246fdae67b8a33799ea580b68593 (diff)
downloadmpd-f54bcc1f16f815fb507ac8a8ffd7913f686969d2.tar.gz
mpd-f54bcc1f16f815fb507ac8a8ffd7913f686969d2.tar.xz
mpd-f54bcc1f16f815fb507ac8a8ffd7913f686969d2.zip
FilterPlugin: pass config_param reference
Diffstat (limited to 'src/FilterConfig.cxx')
-rw-r--r--src/FilterConfig.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/FilterConfig.cxx b/src/FilterConfig.cxx
index e56c5a988..389afa99d 100644
--- a/src/FilterConfig.cxx
+++ b/src/FilterConfig.cxx
@@ -48,8 +48,7 @@ filter_plugin_config(const char *filter_template_name, GError **error_r)
const struct config_param *param = NULL;
while ((param = config_get_next_param(CONF_AUDIO_FILTER, param)) != NULL) {
- const char *name =
- config_get_block_string(param, "name", NULL);
+ const char *name = param->GetBlockValue("name");
if (name == NULL) {
g_set_error(error_r, filter_quark(), 1,
"filter configuration without 'name' name in line %d",
@@ -100,14 +99,14 @@ filter_chain_parse(Filter &chain, const char *spec, GError **error_r)
}
// Instantiate one of those filter plugins with the template name as a hint
- Filter *f = filter_configured_new(cfg, error_r);
+ Filter *f = filter_configured_new(*cfg, error_r);
if (f == NULL) {
// The error has already been set, just stop.
break;
}
- const char *plugin_name =
- config_get_block_string(cfg, "plugin", "unknown");
+ const char *plugin_name = cfg->GetBlockValue("plugin",
+ "unknown");
filter_chain_append(chain, plugin_name, f);
++added_filters;