From b18f02d1ad5e5ce4031438f1cd0f1f3aaaf83003 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 1 Dec 2013 00:12:10 +0100 Subject: options: add options that set defaults for af/vf/ao/vo There are some use cases for this. For example, you can use it to set defaults of automatically inserted filters (like af_lavrresample). It's also useful if you have a non-trivial VO configuration, and want to use --vo to quickly change between the drivers without repeating the whole configuration in the --vo argument. --- video/filter/vf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'video/filter') diff --git a/video/filter/vf.c b/video/filter/vf.c index 212fc1d7a5..bbe0ef8534 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -251,6 +251,8 @@ static struct vf_instance *vf_open(struct MPOpts *opts, vf_instance_t *next, .out_pool = talloc_steal(vf, mp_image_pool_new(16)), }; struct m_config *config = m_config_from_obj_desc(vf, &desc); + if (m_config_apply_defaults(config, name, opts->vf_defs) < 0) + goto error; void *priv = NULL; if (m_config_initialize_obj(config, &desc, &priv, &args) < 0) goto error; -- cgit v1.2.3