diff options
author | wm4 <wm4@nowhere> | 2013-08-25 22:49:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-08-26 10:09:45 +0200 |
commit | f3a7849ba67d1e6b7a59f538feb586bfe19b4863 (patch) | |
tree | c0589888a36f7b39a83364f8c48c76877fba6243 | |
parent | 971e8456fc36eb36213c60ab57828aec8640819b (diff) | |
download | mpv-f3a7849ba67d1e6b7a59f538feb586bfe19b4863.tar.bz2 mpv-f3a7849ba67d1e6b7a59f538feb586bfe19b4863.tar.xz |
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.
-rw-r--r-- | stream/stream.c | 3 |
1 files changed, 0 insertions, 3 deletions
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; |