From 4664f8b3b7cd5089463623df02655ec11e258671 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 19 May 2014 23:27:09 +0200 Subject: cache: redo options and default settings Some options change from percentages to number of kilobytes; there are no cache options using percentages anymore. Raise the default values. The cache is now 25000 kilobytes, although if your connection is slow enough, the maximum is probably never reached. (Although all the memory will still be used as seekback-cache.) Remove the separate --audio-file-cache option, and use the cache default settings for it. --- player/timeline/tl_matroska.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'player/timeline/tl_matroska.c') diff --git a/player/timeline/tl_matroska.c b/player/timeline/tl_matroska.c index 176d35c21f..cfcc379867 100644 --- a/player/timeline/tl_matroska.c +++ b/player/timeline/tl_matroska.c @@ -119,7 +119,7 @@ static int enable_cache(struct MPContext *mpctx, struct stream **stream, { struct MPOpts *opts = mpctx->opts; - if (opts->stream_cache_size <= 0) + if (!stream_wants_cache(*stream, &opts->stream_cache)) return 0; char *filename = talloc_strdup(NULL, (*demuxer)->filename); @@ -132,11 +132,7 @@ static int enable_cache(struct MPContext *mpctx, struct stream **stream, return -1; } - stream_enable_cache_percent(stream, - opts->stream_cache_size, - opts->stream_cache_def_size, - opts->stream_cache_min_percent, - opts->stream_cache_seek_min_percent); + stream_enable_cache(stream, &opts->stream_cache); *demuxer = demux_open(*stream, "mkv", params, mpctx->global); if (!*demuxer) { -- cgit v1.2.3