summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf.c1
-rw-r--r--video/filter/vf.h1
-rw-r--r--video/filter/vf_scale.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index 32a376af3f..5326483444 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -275,6 +275,7 @@ static struct vf_instance *vf_open(struct vf_chain *c, const char *name,
.hwdec = c->hwdec,
.query_format = vf_default_query_format,
.out_pool = talloc_steal(vf, mp_image_pool_new(16)),
+ .chain = c,
};
struct m_config *config = m_config_from_obj_desc(vf, vf->log, &desc);
if (m_config_apply_defaults(config, name, c->opts->vf_defs) < 0)
diff --git a/video/filter/vf.h b/video/filter/vf.h
index 0e3a02b3a2..bfe573e618 100644
--- a/video/filter/vf.h
+++ b/video/filter/vf.h
@@ -93,6 +93,7 @@ typedef struct vf_instance {
// Caches valid output formats.
uint8_t last_outfmts[IMGFMT_END - IMGFMT_START];
+ struct vf_chain *chain;
struct vf_instance *next;
} vf_instance_t;
diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c
index bcb4cae2f2..730994c12c 100644
--- a/video/filter/vf_scale.c
+++ b/video/filter/vf_scale.c
@@ -317,7 +317,7 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *in,
}
mp_image_params_guess_csp(out);
- mp_sws_set_from_cmdline(vf->priv->sws);
+ mp_sws_set_from_cmdline(vf->priv->sws, vf->chain->opts->vo.sws_opts);
vf->priv->sws->flags |= vf->priv->v_chr_drop << SWS_SRC_V_CHR_DROP_SHIFT;
vf->priv->sws->flags |= vf->priv->accurate_rnd * SWS_ACCURATE_RND;
vf->priv->sws->src = *in;