This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit df45ea3050ef2325c3b4bf2be4fcd99d4a12fc91 Author: Niklas Haas <[email protected]> AuthorDate: Mon Oct 19 19:58:56 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Sat Oct 31 13:37:58 2026 +0100 avfilter/vf_libplacebo: factor out append_inputs() Co-Authored-By: Claude Opus 5.5 <[email protected]> Sponsored-by: nxtedition AB Signed-off-by: Niklas Haas <[email protected]> --- libavfilter/vf_libplacebo.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index bb1da66ecc..f330eb39df 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -551,6 +551,26 @@ static int init_common(AVFilterContext *avctx) return 0; } +static int append_inputs(AVFilterContext *avctx, int nb_inputs, + int (*config_props)(AVFilterLink *link)) +{ + int err; + + for (int i = 0; i < nb_inputs; i++) { + AVFilterPad pad = { + .name = av_asprintf("input%d", i), + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_props, + }; + if (!pad.name) + return AVERROR(ENOMEM); + if ((err = ff_append_inpad_free_name(avctx, &pad)) < 0) + return err; + } + + return 0; +} + static int libplacebo_init(AVFilterContext *avctx) { int err = 0; @@ -572,17 +592,7 @@ static int libplacebo_init(AVFilterContext *avctx) return AVERROR(ENOMEM); } - for (int i = 0; i < s->nb_inputs; i++) { - AVFilterPad pad = { - .name = av_asprintf("input%d", i), - .type = AVMEDIA_TYPE_VIDEO, - .config_props = &libplacebo_config_input, - }; - if (!pad.name) - return AVERROR(ENOMEM); - RET(ff_append_inpad_free_name(avctx, &pad)); - } - + RET(append_inputs(avctx, s->nb_inputs, &libplacebo_config_input)); RET(update_settings(avctx)); RET(av_expr_parse(&s->crop_x_pexpr, s->crop_x_expr, var_names, NULL, NULL, NULL, NULL, 0, s)); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
