From 464a045ed84035bf1c15ea2eb55d9efe1662f524 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 30 Nov 2019 00:56:23 +0100 Subject: command: merge two functions Due to recent changes, it makes no sense anymore to keep them separate. --- player/command.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/player/command.c b/player/command.c index 91dd6f80e4..b90edec6a4 100644 --- a/player/command.c +++ b/player/command.c @@ -137,9 +137,6 @@ static int set_filters(struct MPContext *mpctx, enum stream_type mediatype, static bool is_property_set(int action, void *val); -static int mp_property_do_silent(const char *name, int action, void *val, - struct MPContext *ctx); - static void hook_remove(struct MPContext *mpctx, struct hook_handler *h) { struct command_ctx *cmd = mpctx->command_ctx; @@ -3531,20 +3528,15 @@ static bool is_property_set(int action, void *val) } } -static int mp_property_do_silent(const char *name, int action, void *val, - struct MPContext *ctx) +int mp_property_do(const char *name, int action, void *val, + struct MPContext *ctx) { struct command_ctx *cmd = ctx->command_ctx; int r = m_property_do(ctx->log, cmd->properties, name, action, val, ctx); + if (r == M_PROPERTY_OK && is_property_set(action, val)) mp_notify_property(ctx, (char *)name); - return r; -} -int mp_property_do(const char *name, int action, void *val, - struct MPContext *ctx) -{ - int r = mp_property_do_silent(name, action, val, ctx); if (mp_msg_test(ctx->log, MSGL_V) && is_property_set(action, val)) { struct m_option ot = {0}; void *data = val; -- cgit v1.2.3