diff options
author | Max Kellermann <max@duempel.org> | 2013-08-10 18:02:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-04 18:14:22 +0200 |
commit | 29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch) | |
tree | 79766830b55ebca38ddbce84d8d548227eedb69e /src/decoder/MadDecoderPlugin.cxx | |
parent | c9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff) | |
download | mpd-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/MadDecoderPlugin.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/MadDecoderPlugin.cxx b/src/decoder/MadDecoderPlugin.cxx index 29abfafbd..f77563fb2 100644 --- a/src/decoder/MadDecoderPlugin.cxx +++ b/src/decoder/MadDecoderPlugin.cxx @@ -25,6 +25,7 @@ #include "TagRva2.hxx" #include "TagHandler.hxx" #include "CheckAudioFormat.hxx" +#include "util/Error.hxx" #include <assert.h> #include <unistd.h> @@ -203,8 +204,9 @@ MadDecoder::MadDecoder(struct decoder *_decoder, inline bool MadDecoder::Seek(long offset) { + Error error; if (!input_stream_lock_seek(input_stream, offset, SEEK_SET, - nullptr)) + error)) return false; mad_stream_buffer(&stream, input_buffer, 0); @@ -1124,16 +1126,14 @@ mp3_decode(struct decoder *decoder, struct input_stream *input_stream) return; } + Error error; AudioFormat audio_format; - GError *error = nullptr; if (!audio_format_init_checked(audio_format, data.frame.header.samplerate, SampleFormat::S24_P32, MAD_NCHANNELS(&data.frame.header), - &error)) { - g_warning("%s", error->message); - g_error_free(error); - + error)) { + g_warning("%s", error.GetMessage()); delete tag; return; } |