summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-17 16:56:32 +0100
committerwm4 <wm4@nowhere>2016-01-17 16:57:22 +0100
commit004bc9526308c6bc3f51591423e88bb1adaff167 (patch)
tree07fb82b2ba2920096a5a7de222b0e4a334c4985a /player/command.c
parent24fc176dfb0219bea6b9327b5299b6bb7d755732 (diff)
downloadmpv-004bc9526308c6bc3f51591423e88bb1adaff167.tar.bz2
mpv-004bc9526308c6bc3f51591423e88bb1adaff167.tar.xz
player: refactor: eliminate MPContext.d_sub
The same is going to happen to d_video and d_audio later.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c3
1 files changed, 2 insertions, 1 deletions
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];