From 004bc9526308c6bc3f51591423e88bb1adaff167 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 17 Jan 2016 16:56:32 +0100 Subject: player: refactor: eliminate MPContext.d_sub The same is going to happen to d_video and d_audio later. --- player/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index f86926c930..4c40be2bf1 100644 --- a/player/command.c +++ b/player/command.c @@ -4564,7 +4564,8 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re case MP_CMD_SUB_SEEK: { if (!mpctx->playback_initialized) return -1; - struct dec_sub *sub = mpctx->d_sub[0]; + struct track *track = mpctx->current_track[0][STREAM_SUB]; + struct dec_sub *sub = track ? track->d_sub : NULL; double refpts = get_current_time(mpctx); if (sub && refpts != MP_NOPTS_VALUE) { double a[2]; -- cgit v1.2.3