diff options
Diffstat (limited to 'player/timeline/tl_matroska.c')
-rw-r--r-- | player/timeline/tl_matroska.c | 8 |
1 files changed, 2 insertions, 6 deletions
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) { |