summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-09-29 02:24:29 +0200
committerwm4 <wm4@nowhere>2019-09-29 02:24:29 +0200
commit3b13a4799314fba316bcd4e7abce2685415c262b (patch)
tree90c520398373d174a0d21fd9adbfd7f56301adaa /player/core.h
parenta604dc12be13af547572f18b9e09222eeda193c9 (diff)
downloadmpv-3b13a4799314fba316bcd4e7abce2685415c262b.tar.bz2
mpv-3b13a4799314fba316bcd4e7abce2685415c262b.tar.xz
loadfile: don't always accidentally always prefetching
demux_start_prefetch() was called unconditionally in two cases. This is completely wrong. I'm not sure what part of my brain died off that something this obviously wrong went in. The prefetch case is a bit more complicated. It's a different thread, so you can't access just access mpctx->opts there. So add an explicit field for this, which is the simplest way to get this done. (Even if it's bad factoring.) Fixes: c1f1a0845e03885eebe63 Fixes: 556e204a112ee286972e5
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h
index 893a4cf3e8..11e741bb78 100644
--- a/player/core.h
+++ b/player/core.h
@@ -457,6 +457,7 @@ typedef struct MPContext {
char *open_url;
char *open_format;
int open_url_flags;
+ bool open_for_prefetch;
// --- All fields below are owned by open_thread, unless open_done was set
// to true.
struct demuxer *open_res_demuxer;