summaryrefslogtreecommitdiffstats
path: root/video/out/vo.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo.c')
-rw-r--r--video/out/vo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 217baac632..f9c5d04e24 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -228,6 +228,12 @@ static void update_opts(void *p)
if (vo->driver->control)
vo->driver->control(vo, VOCTRL_UPDATE_RENDER_OPTS, NULL);
}
+
+ if (m_config_cache_update(vo->eq_opts_cache)) {
+ // "Legacy" update of video equalizer related options.
+ if (vo->driver->control)
+ vo->driver->control(vo, VOCTRL_SET_EQUALIZER, NULL);
+ }
}
// Does not include thread- and VO uninit.
@@ -238,6 +244,7 @@ static void dealloc_vo(struct vo *vo)
// These must be free'd before vo->in->dispatch.
talloc_free(vo->opts_cache);
talloc_free(vo->gl_opts_cache);
+ talloc_free(vo->eq_opts_cache);
pthread_mutex_destroy(&vo->in->lock);
pthread_cond_destroy(&vo->in->wakeup);
@@ -291,6 +298,10 @@ static struct vo *vo_create(bool probing, struct mpv_global *global,
update_opts, vo);
#endif
+ vo->eq_opts_cache = m_config_cache_alloc(NULL, global, &mp_csp_equalizer_conf);
+ m_config_cache_set_dispatch_change_cb(vo->eq_opts_cache, vo->in->dispatch,
+ update_opts, vo);
+
mp_input_set_mouse_transform(vo->input_ctx, NULL, NULL);
if (vo->driver->encode != !!vo->encode_lavc_ctx)
goto error;