This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/5.1 in repository ffmpeg.
commit 3de46ebb0e81f191305cbd94e53bb9615de6c57d Author: Karl Mogensen <[email protected]> AuthorDate: Sun Mar 8 18:07:35 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Tue May 5 15:21:11 2026 +0200 avfilter/af_lv2: call lilv_instance_activate before lilv_instance_run Why: the change is done to comply with lilv expectations of hosts. Added call lilv_instance_activate in the config_output function to abide by lilv documentation that states it must be called before lilv_instance_run: "This MUST be called before calling lilv_instance_run()" - documentation source (https://github.com/lv2/lilv/blob/main/include/lilv/lilv.h) Added call lilv_instance_deactivate in the uninit function to abide by lv2 documentation: "If a host calls activate(), it MUST call deactivate() at some point in the future" - documentation source (https://gitlab.com/lv2/lv2/-/blob/main/include/lv2/core/lv2.h) Added instance_activated integer to LV2Context struct to track if instance was activated and only do lilv_instance_deactivate if was activated to abide by lv2 documentation: "Hosts MUST NOT call deactivate() unless activate() was previously called." - documentation source (https://gitlab.com/lv2/lv2/-/blob/main/include/lv2/core/lv2.h) Regarding the patcheck warning (possibly constant :instance_activated): This is a false positive since the struct member is zero-initialized. Fixes: trac issue #11661 (https://trac.ffmpeg.org/ticket/11661) Reported-by: Dave Flater Signed-off-by: Karl Mogensen <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit fa281d139453ca43ef6054b1c5b829141405c80d) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/af_lv2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/af_lv2.c b/libavfilter/af_lv2.c index 3cdf16457c..d6be10398a 100644 --- a/libavfilter/af_lv2.c +++ b/libavfilter/af_lv2.c @@ -72,6 +72,7 @@ typedef struct LV2Context { float *controls; LilvInstance *instance; + int instance_activated; LilvNode *atom_AtomPort; LilvNode *atom_Sequence; @@ -389,6 +390,9 @@ FF_ENABLE_DEPRECATION_WARNINGS inlink->min_samples = inlink->max_samples = 4096; } + lilv_instance_activate(s->instance); + s->instance_activated = 1; + return 0; } @@ -568,6 +572,8 @@ static av_cold void uninit(AVFilterContext *ctx) { LV2Context *s = ctx->priv; + if (s->instance_activated) + lilv_instance_deactivate(s->instance); lilv_node_free(s->powerOf2BlockLength); lilv_node_free(s->fixedBlockLength); lilv_node_free(s->boundedBlockLength); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
