diff options
Diffstat (limited to 'player/client.c')
-rw-r--r-- | player/client.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c index 8a22a2cb32..6a45ec7fb6 100644 --- a/player/client.c +++ b/player/client.c @@ -1087,6 +1087,15 @@ int mpv_command_node(mpv_handle *ctx, mpv_node *args, mpv_node *result) return r; } +int mpv_command_ret(mpv_handle *ctx, const char **args, mpv_node *result) +{ + struct mpv_node rn = {.format = MPV_FORMAT_NONE}; + int r = run_client_command(ctx, mp_input_parse_cmd_strv(ctx->log, args), &rn); + if (result && r >= 0) + *result = rn; + return r; +} + int mpv_command_string(mpv_handle *ctx, const char *args) { return run_client_command(ctx, |