mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user