summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-17 21:42:26 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2017-12-23 00:32:59 +0100
commita23a98f648857986228237525492b72fc9ee6960 (patch)
treecb9b157f0e49ea8652f595fafd386fd12c4a2a12
parent382a8ac0b02cb1af5610544c9683078b4ba54c75 (diff)
downloadmpv-a23a98f648857986228237525492b72fc9ee6960.tar.bz2
mpv-a23a98f648857986228237525492b72fc9ee6960.tar.xz
cache: lower default size to 2*10MB
Reduce it from 75MB in both directions (forward/backwards) to 10MB each. The stream cache is kind of becoming useless in favor of the demuxer cache. Using both doesn't make much sense, because they will contain duplicated data for no reason. Still leave it at 10MB, which may help with mp4 a bit. libavformat's mp4 demuxer tends to seek too much, so we try to avoid triggering network level seeks by having some caching in the stream layer.
-rw-r--r--DOCS/man/options.rst4
-rw-r--r--stream/cache.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 3759540207..17495d64cb 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -3756,7 +3756,7 @@ Cache
between readahead and backbuffer sizes.
``--cache-default=<kBytes|no>``
- Set the size of the cache in kilobytes (default: 75000 KB). Using ``no``
+ Set the size of the cache in kilobytes (default: 10000 KB). Using ``no``
will not automatically enable the cache e.g. when playing from a network
stream. Note that using ``--cache`` will always override this option.
@@ -3777,7 +3777,7 @@ Cache
This option allows control over this.
``--cache-backbuffer=<kBytes>``
- Size of the cache back buffer (default: 75000 KB). This will add to the total
+ Size of the cache back buffer (default: 10000 KB). This will add to the total
cache size, and reserved the amount for seeking back. The reserved amount
will not be used for readahead, and instead preserves already read data to
enable fast seeking back.
diff --git a/stream/cache.c b/stream/cache.c
index d897fec665..e64aaf87ad 100644
--- a/stream/cache.c
+++ b/stream/cache.c
@@ -79,10 +79,10 @@ const struct m_sub_options stream_cache_conf = {
.size = sizeof(struct mp_cache_opts),
.defaults = &(const struct mp_cache_opts){
.size = -1,
- .def_size = 75000,
+ .def_size = 10000,
.initial = 0,
.seek_min = 500,
- .back_buffer = 75000,
+ .back_buffer = 10000,
.file_max = 1024 * 1024,
},
};