mirror of
https://github.com/mpv-player/mpv
synced 2025-03-21 10:51:51 +00:00
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.
This commit is contained in:
parent
971e8456fc
commit
f3a7849ba6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user