aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/Mpg123DecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 18:02:44 +0200
committerMax Kellermann <max@duempel.org>2013-09-04 18:14:22 +0200
commit29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch)
tree79766830b55ebca38ddbce84d8d548227eedb69e /src/decoder/Mpg123DecoderPlugin.cxx
parentc9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff)
downloadmpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to '')
-rw-r--r--src/decoder/Mpg123DecoderPlugin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/Mpg123DecoderPlugin.cxx b/src/decoder/Mpg123DecoderPlugin.cxx
index 05fe4717c..c30455121 100644
--- a/src/decoder/Mpg123DecoderPlugin.cxx
+++ b/src/decoder/Mpg123DecoderPlugin.cxx
@@ -22,6 +22,7 @@
#include "DecoderAPI.hxx"
#include "CheckAudioFormat.hxx"
#include "TagHandler.hxx"
+#include "util/Error.hxx"
#include <glib.h>
@@ -58,7 +59,6 @@ static bool
mpd_mpg123_open(mpg123_handle *handle, const char *path_fs,
AudioFormat &audio_format)
{
- GError *gerror = nullptr;
char *path_dup;
int error;
int channels, encoding;
@@ -90,10 +90,10 @@ mpd_mpg123_open(mpg123_handle *handle, const char *path_fs,
return false;
}
+ Error error2;
if (!audio_format_init_checked(audio_format, rate, SampleFormat::S16,
- channels, &gerror)) {
- g_warning("%s", gerror->message);
- g_error_free(gerror);
+ channels, error2)) {
+ g_warning("%s", error2.GetMessage());
return false;
}