mirror of https://github.com/mpv-player/mpv
command: merge two functions
Due to recent changes, it makes no sense anymore to keep them separate.
This commit is contained in:
parent
56b06907a6
commit
464a045ed8
|
@ -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 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)
|
static void hook_remove(struct MPContext *mpctx, struct hook_handler *h)
|
||||||
{
|
{
|
||||||
struct command_ctx *cmd = mpctx->command_ctx;
|
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,
|
int mp_property_do(const char *name, int action, void *val,
|
||||||
struct MPContext *ctx)
|
struct MPContext *ctx)
|
||||||
{
|
{
|
||||||
struct command_ctx *cmd = ctx->command_ctx;
|
struct command_ctx *cmd = ctx->command_ctx;
|
||||||
int r = m_property_do(ctx->log, cmd->properties, name, action, val, ctx);
|
int r = m_property_do(ctx->log, cmd->properties, name, action, val, ctx);
|
||||||
|
|
||||||
if (r == M_PROPERTY_OK && is_property_set(action, val))
|
if (r == M_PROPERTY_OK && is_property_set(action, val))
|
||||||
mp_notify_property(ctx, (char *)name);
|
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)) {
|
if (mp_msg_test(ctx->log, MSGL_V) && is_property_set(action, val)) {
|
||||||
struct m_option ot = {0};
|
struct m_option ot = {0};
|
||||||
void *data = val;
|
void *data = val;
|
||||||
|
|
Loading…
Reference in New Issue