From 29030b54c98b0aee65fbc10ebf7ba36bed98c02c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Aug 2013 18:02:44 +0200 Subject: util/Error: new error passing library Replaces GLib's GError. --- src/decoder/AdPlugDecoderPlugin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/decoder/AdPlugDecoderPlugin.cxx') diff --git a/src/decoder/AdPlugDecoderPlugin.cxx b/src/decoder/AdPlugDecoderPlugin.cxx index 47ab1a7f3..f3b986fc8 100644 --- a/src/decoder/AdPlugDecoderPlugin.cxx +++ b/src/decoder/AdPlugDecoderPlugin.cxx @@ -22,6 +22,7 @@ #include "TagHandler.hxx" #include "DecoderAPI.hxx" #include "CheckAudioFormat.hxx" +#include "util/Error.hxx" #include #include @@ -38,12 +39,11 @@ static unsigned sample_rate; static bool adplug_init(const config_param ¶m) { - GError *error = NULL; + Error error; sample_rate = param.GetBlockValue("sample_rate", 48000u); - if (!audio_check_sample_rate(sample_rate, &error)) { - g_warning("%s\n", error->message); - g_error_free(error); + if (!audio_check_sample_rate(sample_rate, error)) { + g_warning("%s", error.GetMessage()); return false; } -- cgit v1.2.3