From 23289a452f011a5ab5de2bdea460f35016944ebb Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Dec 2019 19:27:45 +0100 Subject: [PATCH] command: fix unintended reset of filters Since the recent option changes (probably b16cea750f527), using the "vf" or "af" commands to change the filter chain did not write the option value correctly. This led to the option value being reset the next time an option changed. This happened because the new option value was not copied to the m_config_cache's internal storage. So on the next option update, it looked like the option value changed, because the user-side value was different from the internal value. It was copied back, which meant the original option value was reinstated, and the previous "vf"/"af" command was undone. Fix this by using the correct way to store the option value. This also takes care of property change notification (because the function is specifically separate from m_config_cache_write_opt() to do that), so remove the old call. Fixes: #7220 --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/command.c b/player/command.c index d9ff3c261f..1a7d5a6d20 100644 --- a/player/command.c +++ b/player/command.c @@ -3777,7 +3777,7 @@ static int set_filters(struct MPContext *mpctx, enum stream_type mediatype, if (success) { m_option_free(co->opt, &old_settings); - mp_notify_property(mpctx, filter_opt[mediatype]); + m_config_notify_change_opt_ptr(mpctx->mconfig, list); } else { m_option_free(co->opt, list); *list = old_settings;