aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/rewind_input_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-16 21:06:12 +0200
committerMax Kellermann <max@duempel.org>2011-09-16 21:22:02 +0200
commit29241c4f835797f635816a9f37528aa981f722b5 (patch)
treeda166b242c4d960619498b9b7bd13ec44415915d /src/input/rewind_input_plugin.c
parent6f655eb9b90e0855112038c0779eb61194cb7ef6 (diff)
downloadmpd-29241c4f835797f635816a9f37528aa981f722b5.tar.gz
mpd-29241c4f835797f635816a9f37528aa981f722b5.tar.xz
mpd-29241c4f835797f635816a9f37528aa981f722b5.zip
input_plugin: add method check()
To check for errors without reading. The decoder thread wants to do that, before it passes the input stream to the plugin.
Diffstat (limited to 'src/input/rewind_input_plugin.c')
-rw-r--r--src/input/rewind_input_plugin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c
index fa2065d61..2a3eecf82 100644
--- a/src/input/rewind_input_plugin.c
+++ b/src/input/rewind_input_plugin.c
@@ -107,6 +107,14 @@ input_rewind_close(struct input_stream *is)
g_free(r);
}
+static bool
+input_rewind_check(struct input_stream *is, GError **error_r)
+{
+ struct input_rewind *r = (struct input_rewind *)is;
+
+ return input_stream_check(r->input, error_r);
+}
+
static void
input_rewind_update(struct input_stream *is)
{
@@ -221,6 +229,7 @@ input_rewind_seek(struct input_stream *is, goffset offset, int whence,
static const struct input_plugin rewind_input_plugin = {
.close = input_rewind_close,
+ .check = input_rewind_check,
.update = input_rewind_update,
.tag = input_rewind_tag,
.buffer = input_rewind_buffer,