summaryrefslogtreecommitdiffstats
path: root/player/timeline
diff options
context:
space:
mode:
Diffstat (limited to 'player/timeline')
-rw-r--r--player/timeline/tl_matroska.c8
-rw-r--r--player/timeline/tl_mpv_edl.c6
2 files changed, 3 insertions, 11 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) {
diff --git a/player/timeline/tl_mpv_edl.c b/player/timeline/tl_mpv_edl.c
index 277db5b87f..7892d5294d 100644
--- a/player/timeline/tl_mpv_edl.c
+++ b/player/timeline/tl_mpv_edl.c
@@ -129,11 +129,7 @@ static struct demuxer *open_file(char *filename, struct MPContext *mpctx)
struct demuxer *d = NULL;
struct stream *s = stream_open(filename, mpctx->global);
if (s) {
- stream_enable_cache_percent(&s,
- opts->stream_cache_size,
- opts->stream_cache_def_size,
- opts->stream_cache_min_percent,
- opts->stream_cache_seek_min_percent);
+ stream_enable_cache(&s, &opts->stream_cache);
d = demux_open(s, NULL, NULL, mpctx->global);
}
if (!d) {