summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-05-16 16:29:45 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commit556e204a112ee286972e50d636dec8b46ca125d7 (patch)
treefb388c85c5ea1de9283ee1957bdd9e154a1d9d66 /demux/demux.c
parentd7c7f80cc1cf5b6a8207a3954ccdc984316c0602 (diff)
downloadmpv-556e204a112ee286972e50d636dec8b46ca125d7.tar.bz2
mpv-556e204a112ee286972e50d636dec8b46ca125d7.tar.xz
player: add --demuxer-cache-wait option
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index be866b1642..36b6ec9231 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1100,6 +1100,17 @@ void demux_set_wakeup_cb(struct demuxer *demuxer, void (*cb)(void *ctx), void *c
pthread_mutex_unlock(&in->lock);
}
+void demux_start_prefetch(struct demuxer *demuxer)
+{
+ struct demux_internal *in = demuxer->in;
+ assert(demuxer == in->d_user);
+
+ pthread_mutex_lock(&in->lock);
+ in->reading = true;
+ pthread_cond_signal(&in->wakeup);
+ pthread_mutex_unlock(&in->lock);
+}
+
const char *stream_type_name(enum stream_type type)
{
switch (type) {