From 835586513d026bcf1e7dec4693e07c28dda8cedd Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 31 Oct 2019 15:18:57 +0100 Subject: sws_utils: shuffle around some shit Purpose uncertain. I guess it's slightly better, maybe. The move of the sws/zimg options from VO opts (vo_opt_list) to the top-level option list is tricky. VO opts have some helper code in vo.c, that sends VOCTRL_SET_PANSCAN to the VO on every VO opts change. That's because updating certain VO options used to be this way (and not just the panscan option). This isn't needed anymore for sws/zimg options, so explicitly move them away. --- video/out/vo_tct.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'video/out/vo_tct.c') diff --git a/video/out/vo_tct.c b/video/out/vo_tct.c index 6a07786996..159b50922b 100644 --- a/video/out/vo_tct.c +++ b/video/out/vo_tct.c @@ -207,7 +207,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params) if (p->buffer) free(p->buffer); - mp_sws_set_from_cmdline(p->sws, vo->global); p->sws->src = *params; p->sws->dst = (struct mp_image_params) { .imgfmt = IMGFMT, @@ -265,8 +264,6 @@ static void uninit(struct vo *vo) struct priv *p = vo->priv; if (p->buffer) talloc_free(p->buffer); - if (p->sws) - talloc_free(p->sws); } static int preinit(struct vo *vo) @@ -278,6 +275,8 @@ static int preinit(struct vo *vo) struct priv *p = vo->priv; p->opts = mp_get_config_group(vo, vo->global, &vo_tct_conf); p->sws = mp_sws_alloc(vo); + p->sws->log = vo->log; + mp_sws_enable_cmdline_opts(p->sws, vo->global); return 0; } -- cgit v1.2.3