diff options
author | Max Kellermann <max@duempel.org> | 2009-11-14 23:53:04 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-15 23:12:11 +0100 |
commit | 228b03edf8513aa1cdaf4e4647279cc580245555 (patch) | |
tree | 7f5b03a9727fb8c371885469296eb7f49f6fa68b /test/run_decoder.c | |
parent | d000d31355c824a076324b647a3f056aab9ddabe (diff) | |
download | mpd-228b03edf8513aa1cdaf4e4647279cc580245555.tar.gz mpd-228b03edf8513aa1cdaf4e4647279cc580245555.tar.xz mpd-228b03edf8513aa1cdaf4e4647279cc580245555.zip |
input_stream: return errors with GError
Diffstat (limited to '')
-rw-r--r-- | test/run_decoder.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/run_decoder.c b/test/run_decoder.c index dd1ecdb67..0ac5a7f21 100644 --- a/test/run_decoder.c +++ b/test/run_decoder.c @@ -114,7 +114,7 @@ decoder_read(G_GNUC_UNUSED struct decoder *decoder, struct input_stream *is, void *buffer, size_t length) { - return input_stream_read(is, buffer, length); + return input_stream_read(is, buffer, length, NULL); } enum decoder_command @@ -175,9 +175,16 @@ int main(int argc, char **argv) } else if (decoder.plugin->stream_decode != NULL) { struct input_stream is; - ret = input_stream_open(&is, decoder.uri); - if (!ret) + ret = input_stream_open(&is, decoder.uri, &error); + if (!ret) { + if (error != NULL) { + g_warning("%s", error->message); + g_error_free(error); + } else + g_printerr("input_stream_open() failed\n"); + return 1; + } decoder_plugin_stream_decode(decoder.plugin, &decoder, &is); |