lavfi/avfilter: export AVFilter initialization state

This will allow the AVOption code to detect setting non-runtime options
after the filter has been initialized.
This commit is contained in:
Anton Khirnov
2024-09-28 16:19:06 +02:00
parent 0548ab2e42
commit 262e6f8430
3 changed files with 9 additions and 7 deletions

View File

@@ -627,7 +627,8 @@ int avfilter_graph_segment_init(AVFilterGraphSegment *seg, int flags)
if (p->filter_name)
return fail_creation_pending(seg, p->filter_name, __func__);
if (!p->filter || fffilterctx(p->filter)->initialized)
if (!p->filter ||
(fffilterctx(p->filter)->state_flags & AV_CLASS_STATE_INITIALIZED))
continue;
ret = avfilter_init_dict(p->filter, NULL);