diff options
author | wm4 <wm4@nowhere> | 2019-11-25 01:16:03 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-25 01:16:03 +0100 |
commit | 13afc2150beeb1117e9c1724b2910e41ee4cc28b (patch) | |
tree | 65652f65f0dfce9b0c0abba27842e827acef5fa9 /player/command.c | |
parent | f5daae12ff600b1c109d66efeca5e18176089b90 (diff) | |
download | mpv-13afc2150beeb1117e9c1724b2910e41ee4cc28b.tar.bz2 mpv-13afc2150beeb1117e9c1724b2910e41ee4cc28b.tar.xz |
command: change af/vf property behavior wrt. filter creation failures
The behavior is slightly different in a messy way. The change is in line
with the option-to-property bridge removal mentioned some commits ago
and thus is deemed necessary.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/player/command.c b/player/command.c index e7471e47fd..74db80e7b9 100644 --- a/player/command.c +++ b/player/command.c @@ -2989,17 +2989,12 @@ static char *print_obj_osd_list(struct m_obj_settings *list) static int property_filter(struct m_property *prop, int action, void *arg, MPContext *mpctx, enum stream_type mt) { - switch (action) { - case M_PROPERTY_PRINT: { + if (action == M_PROPERTY_PRINT) { struct m_config_option *opt = m_config_get_co(mpctx->mconfig, bstr0(prop->name)); *(char **)arg = print_obj_osd_list(*(struct m_obj_settings **)opt->data); return M_PROPERTY_OK; } - case M_PROPERTY_SET: - return set_filters(mpctx, mt, *(struct m_obj_settings **)arg) >= 0 - ? M_PROPERTY_OK : M_PROPERTY_ERROR; - } return mp_property_generic_option(mpctx, prop, action, arg); } @@ -6314,6 +6309,12 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags) if (opt_ptr == &opts->record_file) open_recorder(mpctx, false); + + if (opt_ptr == &opts->vf_settings) + set_filters(mpctx, STREAM_VIDEO, opts->vf_settings); + + if (opt_ptr == &opts->af_settings) + set_filters(mpctx, STREAM_AUDIO, opts->af_settings); } void mp_notify_property(struct MPContext *mpctx, const char *property) |