From e277fadd60350caad1fc31e92a5076692e61dcc9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Jan 2017 19:02:50 +0100 Subject: player: add prefetching of the next playlist entry Since for mpv CLI, the player state is a singleton, full prefetching is a bit tricky. We do it only on the demuxer layer. The implementation reuses the old "open thread". This means there is significant potential for regressions even if the new option is not used. This is made worse by the fact that I barely tested this code. The generic mpctx_run_reentrant() wrapper is also removed - this was its only user, and its remains become part of the new implementation. --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 1beca6158a..7c3e269e9c 100644 --- a/player/command.c +++ b/player/command.c @@ -4959,7 +4959,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re int dir = cmd->id == MP_CMD_PLAYLIST_PREV ? -1 : +1; int force = cmd->args[0].v.i; - struct playlist_entry *e = mp_next_file(mpctx, dir, force); + struct playlist_entry *e = mp_next_file(mpctx, dir, force, true); if (!e && !force) return -1; mp_set_playlist_entry(mpctx, e); -- cgit v1.2.3