From 08cd50b84b853fc525a9074099fbf0a12830afe2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 6 Jul 2016 13:47:58 +0200 Subject: vf: mark filter chain as uninitialized when mutating it Sounds fair. Can be used to determine if the filter chain was mutated at all, and avoiding unconditional reinit if it wasn't. --- 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 b971dc0d8b..17416831f3 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -298,6 +298,7 @@ void vf_remove_filter(struct vf_chain *c, struct vf_instance *vf) assert(prev); // not inserted prev->next = vf->next; vf_uninit_filter(vf); + c->initialized = 0; } struct vf_instance *vf_append_filter(struct vf_chain *c, const char *name, @@ -312,6 +313,7 @@ struct vf_instance *vf_append_filter(struct vf_chain *c, const char *name, pprev = &(*pprev)->next; vf->next = *pprev ? *pprev : NULL; *pprev = vf; + c->initialized = 0; } return vf; } -- cgit v1.2.3