summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-30 00:56:23 +0100
committerwm4 <wm4@nowhere>2019-11-30 00:56:23 +0100
commit464a045ed84035bf1c15ea2eb55d9efe1662f524 (patch)
tree8ce4b6fb6f39bd815c2b5c7f68a01cd3566b82df /player/command.c
parent56b06907a6a68de7ccf44cbfa9c9c6fe0edfc627 (diff)
downloadmpv-464a045ed84035bf1c15ea2eb55d9efe1662f524.tar.bz2
mpv-464a045ed84035bf1c15ea2eb55d9efe1662f524.tar.xz
command: merge two functions
Due to recent changes, it makes no sense anymore to keep them separate.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c14
1 files 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;