From c88f95a2ea1d089501bed84c085acd7312f7dc2a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 29 Dec 2009 23:55:40 +0100 Subject: input/rewind: new input_stream wrapper to allow stream rewinding This replaces the rewinding buffer code from the CURL input plugin. It is more generic, and allows rewinding even when the server sends Icy-Metadata (which would have been too difficult to implement within the CURL plugin). This is a rather complex patch for the stable branch (v0.15.x), but it fixes a serious problem: the "vorbis" decoder plugin was unable to play streams with Icy-Metadata, because it couldn't rewind the stream after detecting the codec (Vorbis vs. FLAC). --- src/input_stream.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/input_stream.c') diff --git a/src/input_stream.c b/src/input_stream.c index 69dc644a2..6a1b5841b 100644 --- a/src/input_stream.c +++ b/src/input_stream.c @@ -22,6 +22,7 @@ #include "conf.h" #include "input/file_input_plugin.h" +#include "input/rewind_input_plugin.h" #ifdef ENABLE_ARCHIVE #include "input/archive_input_plugin.h" @@ -131,6 +132,8 @@ input_stream_open(struct input_stream *is, const char *url) assert(is->plugin->eof != NULL); assert(!is->seekable || is->plugin->seek != NULL); + input_rewind_open(is); + return true; } } -- cgit v1.2.3