summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c3
-rw-r--r--demux/demux.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 2195246ac8..824e20d524 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1305,7 +1305,8 @@ static struct demuxer *open_given_type(struct mpv_global *global,
demux_init_cache(demuxer);
demux_changed(in->d_thread, DEMUX_EVENT_ALL);
demux_update(demuxer);
- stream_control(demuxer->stream, STREAM_CTRL_SET_READAHEAD, &(int){false});
+ stream_control(demuxer->stream, STREAM_CTRL_SET_READAHEAD,
+ &(int){params ? params->initial_readahead : false});
if (!(params && params->disable_timeline)) {
struct timeline *tl = timeline_load(global, log, demuxer);
if (tl) {
diff --git a/demux/demux.h b/demux/demux.h
index 0e5a5e15c6..f9d98e5cef 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -162,6 +162,7 @@ struct demuxer_params {
bool *matroska_was_valid;
struct timeline *timeline;
bool disable_timeline;
+ bool initial_readahead;
// -- demux_open_url() only
int stream_flags;
bool allow_capture;