diff --git a/player/command.c b/player/command.c index d97460ab91..451cb740a8 100644 --- a/player/command.c +++ b/player/command.c @@ -4018,9 +4018,10 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) return -1; struct osd_sub_state state; get_osd_sub_state(mpctx, 0, &state); - if (state.dec_sub && mpctx->video_pts != MP_NOPTS_VALUE) { + double refpts = get_current_time(mpctx); + if (state.dec_sub && refpts != MP_NOPTS_VALUE) { double a[2]; - a[0] = mpctx->video_pts - state.video_offset - opts->sub_delay; + a[0] = refpts - state.video_offset - opts->sub_delay; a[1] = cmd->args[0].v.i; if (sub_control(state.dec_sub, SD_CTRL_SUB_STEP, a) > 0) { if (cmd->id == MP_CMD_SUB_STEP) {