diff options
author | Max Kellermann <max@duempel.org> | 2010-01-04 21:42:11 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-01-04 21:45:32 +0100 |
commit | 2f8135ef8bb4723e040571e38699300f21334127 (patch) | |
tree | 9fdaded4ca3c6fa9e03af04d04cd2e81f729ea58 | |
parent | 9b9abff97272b52f133ff23addd58b6a90a49a73 (diff) | |
download | mpd-2f8135ef8bb4723e040571e38699300f21334127.tar.gz mpd-2f8135ef8bb4723e040571e38699300f21334127.tar.xz mpd-2f8135ef8bb4723e040571e38699300f21334127.zip |
input/rewind: enable the "rewind" wrapper for all non-seekable streams
Don't limit the "rewind" input plugin to CURL streams.
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | src/input/rewind_input_plugin.c | 5 | ||||
-rw-r--r-- | src/input/rewind_input_plugin.h | 12 |
3 files changed, 3 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index 24035b458..5e8a6b4d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -586,11 +586,11 @@ INPUT_SRC = \ src/input_init.c \ src/input_registry.c \ src/input_stream.c \ + src/input/rewind_input_plugin.c \ src/input/file_input_plugin.c if ENABLE_CURL INPUT_SRC += src/input/curl_input_plugin.c \ - src/input/rewind_input_plugin.c \ src/icy_metadata.c endif diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c index 68b3e8036..2804dd1b2 100644 --- a/src/input/rewind_input_plugin.c +++ b/src/input/rewind_input_plugin.c @@ -221,9 +221,8 @@ input_rewind_open(struct input_stream *is) assert(is != NULL); assert(is->offset == 0); - if (is->plugin != &input_plugin_curl) - /* due to limitations in the input_plugin API, we only - (explicitly) support the CURL input plugin */ + if (is->seekable) + /* seekable resources don't need this plugin */ return is; c = g_new(struct input_rewind, 1); diff --git a/src/input/rewind_input_plugin.h b/src/input/rewind_input_plugin.h index 27ad169b6..23d25d94d 100644 --- a/src/input/rewind_input_plugin.h +++ b/src/input/rewind_input_plugin.h @@ -31,19 +31,7 @@ struct input_stream; -#ifdef ENABLE_CURL - struct input_stream * input_rewind_open(struct input_stream *is); -#else - -static inline struct input_stream * -input_rewind_open(struct input_stream *is) -{ - return is; -} - -#endif - #endif |