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/DsdiffDecoderPlugin.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/decoder/DsdiffDecoderPlugin.cxx') diff --git a/src/decoder/DsdiffDecoderPlugin.cxx b/src/decoder/DsdiffDecoderPlugin.cxx index b6d7f65cc..7c461f9c3 100644 --- a/src/decoder/DsdiffDecoderPlugin.cxx +++ b/src/decoder/DsdiffDecoderPlugin.cxx @@ -31,6 +31,7 @@ #include "DecoderAPI.hxx" #include "CheckAudioFormat.hxx" #include "util/bit_reverse.h" +#include "util/Error.hxx" #include "TagHandler.hxx" #include "DsdLib.hxx" #include "TagHandler.hxx" @@ -432,13 +433,12 @@ dsdiff_stream_decode(struct decoder *decoder, struct input_stream *is) if (!dsdiff_read_metadata(decoder, is, &metadata, &chunk_header)) return; - GError *error = nullptr; + Error error; AudioFormat audio_format; if (!audio_format_init_checked(audio_format, metadata.sample_rate / 8, SampleFormat::DSD, - metadata.channels, &error)) { - g_warning("%s", error->message); - g_error_free(error); + metadata.channels, error)) { + g_warning("%s", error.GetMessage()); return; } @@ -490,7 +490,7 @@ dsdiff_scan_stream(struct input_stream *is, AudioFormat audio_format; if (!audio_format_init_checked(audio_format, metadata.sample_rate / 8, SampleFormat::DSD, - metadata.channels, nullptr)) + metadata.channels, IgnoreError())) /* refuse to parse files which we cannot play anyway */ return false; -- cgit v1.2.3