From f3a7849ba67d1e6b7a59f538feb586bfe19b4863 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 25 Aug 2013 22:49:46 +0200 Subject: stream: don't drop buffer when creating the cache This is really not needed. While we really can't take a loaded buffer over to the cache, there's no reason why the cache couldn't read this buffer normally. On the other hand, this code could cause trouble when probing from a stream before the cache has been enabled. --- stream/stream.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'stream') diff --git a/stream/stream.c b/stream/stream.c index 0832cb7f8a..e1b8efee83 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -732,9 +732,6 @@ static int stream_enable_cache(stream_t **stream, int64_t size, int64_t min, if (orig->mode != STREAM_READ) return 1; - // Can't handle a loaded buffer. - orig->buf_len = orig->buf_pos = 0; - stream_t *cache = new_stream(); cache->uncached_type = orig->type; cache->uncached_stream = orig; -- cgit v1.2.3