From 9b77666783d80fe0c3f6276e07ed97a6706f277f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 12 Mar 2015 23:51:41 +0100 Subject: options: introduce --cache=yes choice I think this is what I alwass missed ever since I found the MPlayer cache options: a way to enable the cache on local files with the default settings, whatever they are. --- stream/stream.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stream/stream.c') diff --git a/stream/stream.c b/stream/stream.c index 825d7a1292..105d56e439 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -752,6 +752,8 @@ static struct mp_cache_opts check_cache_opts(stream_t *stream, struct mp_cache_opts use_opts = *opts; if (use_opts.size == -1) use_opts.size = stream->streaming ? use_opts.def_size : 0; + if (use_opts.size == -2) + use_opts.size = use_opts.def_size; if (stream->mode != STREAM_READ || !stream->allow_caching || use_opts.size < 1) use_opts.size = 0; -- cgit v1.2.3