From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 0E30047FF9 for ; Wed, 19 Feb 2025 17:30:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 44CCF68C2B6; Wed, 19 Feb 2025 19:30:10 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ED12B68C109 for ; Wed, 19 Feb 2025 19:30:01 +0200 (EET) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with ESMTP id 5329E403BC; Wed, 19 Feb 2025 18:30:01 +0100 (CET) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Feb 2025 18:29:56 +0100 Message-ID: <20250219172958.197132-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_libplacebo: switch to new background API X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas Fixes a deprecation warning, and also fixes a bug where the depredated skip_target_clearing option was not correctly mapped to the new API inside libplacebo upstream. Signed-off-by: Niklas Haas Sponsored-by: nxtedition --- libavfilter/vf_libplacebo.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index e1c6629f6d..ce2065cc35 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -887,8 +887,12 @@ static int output_frame(AVFilterContext *ctx, int64_t pts) } /* Draw first frame opaque, others with blending */ - opts->params.skip_target_clearing = false; opts->params.blend_params = NULL; +#if PL_API_VER >= 346 + opts->params.background = opts->params.border = PL_CLEAR_COLOR; +#else + opts->params.skip_target_clearing = false; +#endif for (int i = 0; i < s->nb_inputs; i++) { LibplaceboInput *in = &s->inputs[i]; FilterLink *il = ff_filter_link(ctx->inputs[in->idx]); @@ -899,8 +903,12 @@ static int output_frame(AVFilterContext *ctx, int64_t pts) opts->params.skip_caching_single_frame = high_fps; update_crops(ctx, in, &target, out->pts * av_q2d(outlink->time_base)); pl_render_image_mix(in->renderer, &in->mix, &target, &opts->params); - opts->params.skip_target_clearing = true; opts->params.blend_params = &pl_alpha_overlay; +#if PL_API_VER >= 346 + opts->params.background = opts->params.border = PL_CLEAR_SKIP; +#else + opts->params.skip_target_clearing = true; +#endif } if (outdesc->flags & AV_PIX_FMT_FLAG_HWACCEL) { -- 2.47.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".