summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-12-06 19:27:45 +0100
committerwm4 <wm4@nowhere>2019-12-06 19:27:45 +0100
commit23289a452f011a5ab5de2bdea460f35016944ebb (patch)
treef86581934fdac2e73990bf8ec6d7ad81fd2349a4
parentb0c9f582adb4caac06c567ba1546f5773792bb14 (diff)
downloadmpv-23289a452f011a5ab5de2bdea460f35016944ebb.tar.bz2
mpv-23289a452f011a5ab5de2bdea460f35016944ebb.tar.xz
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
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
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;