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 ESMTP id AAB264439A for ; Mon, 10 Oct 2022 10:55:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 150E768BCE8; Mon, 10 Oct 2022 13:54:54 +0300 (EEST) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6FA3068BCCD for ; Mon, 10 Oct 2022 13:54:46 +0300 (EEST) Received: by mail-pf1-f174.google.com with SMTP id 67so10406281pfz.12 for ; Mon, 10 Oct 2022 03:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=qBtc49Yhz04Ls0at0l1X8Z+WY0GwRn0aN79XFeVtAkk=; b=NS270JWrW8rDmOwI86buXRFs5a1wY38rl+uYG8mEIEQAaKFgWq1x4o6FnDSavqAhut HNtmVrtsUUfBF0MzvFZhtmYwFffYNzKRDaeYNNH04vV94wnBzCw45k0cqd5SvfVLI9n1 W6/K1HgDtd1TrMXwxCpuBJDOeVscYaZHkTxX6Tnlv4rUv2E30zn2oqAZ98TwNl2ZdCNx hDSWnXovlmcS2HtqEUhdumhncbUwetHOaUQRn5aFMNne2GOORjQJrXWOMfHMwS7V+CVa 0N/eX5e5yWozjIr0QshJ4t1XZZ/ia5+CPMgPxVtZG9Pfymiglbx2WDB36BdTjJne0jtz wFeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=qBtc49Yhz04Ls0at0l1X8Z+WY0GwRn0aN79XFeVtAkk=; b=pRDBpQLRy9XqE2z8soanIS2AdgjM0PGx7BDXs50IaNUJseiZbsCdStAwsiYqof7NQ8 JWiOP3AoTUCNFz1wI784MbmiBCjWDSsayINV074LSEFHcrl1q3hRP4s4G1FtLL2swcBf CTI08+cH9A6NqtoLlWYMpCblZk/+PCmqNolsyTf103dDxx8HFAxO6wsSCsoUCaHhQx6Q c6zrkKRXHTDXtKq2LGrgrbuFxlPVkJd+t7IDS/So4Q0AEEIxf/FHC8FRL4AzMKixH4sq ktsYeYGObYZ/dbBJkbPzyZnLqW8+aczQl7zM/7srMyzmBFUwidgwp1BuEsHIwIK8Bbsx CXfA== X-Gm-Message-State: ACrzQf1qBp6rsVD67sfpQAG+3SrDqycrbFXhCWRqbd/N1CCiuaaU8Dak kNTd/WCGiaaHCNnQv7+WEBT6ORtwJXw= X-Google-Smtp-Source: AMsMyM490jfz5zDMCHsOwvmCTP7xuoZZt+egMbIJdVgR1EOxMXQ4bA3NC/xKmxgPLhQ4vtM7Mx3i7A== X-Received: by 2002:a05:6a00:1a47:b0:52e:6a8c:5430 with SMTP id h7-20020a056a001a4700b0052e6a8c5430mr19004728pfv.48.1665399284796; Mon, 10 Oct 2022 03:54:44 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id b16-20020a170902d51000b00174d9bbeda4sm6413978plg.197.2022.10.10.03.54.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Oct 2022 03:54:44 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: <2bd535abb506d1af278e1146de38529c22ed625b.1665399281.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Mon, 10 Oct 2022 10:54:33 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 03/11] avfilter/overlay_vaapi: remove double framesync init 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: softworkz 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: softworkz Signed-off-by: softworkz --- libavfilter/vf_overlay_vaapi.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c index cf17426b5d..66e736cce4 100644 --- a/libavfilter/vf_overlay_vaapi.c +++ b/libavfilter/vf_overlay_vaapi.c @@ -265,28 +265,6 @@ fail: return err; } -static int overlay_vaapi_init_framesync(AVFilterContext *avctx) -{ - OverlayVAAPIContext *ctx = avctx->priv; - int ret, i; - - ctx->fs.on_event = overlay_vaapi_blend; - ctx->fs.opaque = ctx; - ret = ff_framesync_init(&ctx->fs, avctx, avctx->nb_inputs); - if (ret < 0) - return ret; - - for (i = 0; i < avctx->nb_inputs; i++) { - FFFrameSyncIn *in = &ctx->fs.in[i]; - in->before = EXT_STOP; - in->after = EXT_INFINITY; - in->sync = i ? 1 : 2; - in->time_base = avctx->inputs[i]->time_base; - } - - return ff_framesync_configure(&ctx->fs); -} - static int overlay_vaapi_config_output(AVFilterLink *outlink) { AVFilterContext *avctx = outlink->src; @@ -294,10 +272,7 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink) VAAPIVPPContext *vpp_ctx = avctx->priv; int err; - err = overlay_vaapi_init_framesync(avctx); - if (err < 0) - return err; - + outlink->time_base = avctx->inputs[0]->time_base; vpp_ctx->output_width = avctx->inputs[0]->w; vpp_ctx->output_height = avctx->inputs[0]->h; @@ -313,6 +288,10 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink) if (err < 0) return err; + ctx->fs.on_event = overlay_vaapi_blend; + ctx->fs.opaque = ctx; + ctx->fs.time_base = outlink->time_base; + return ff_framesync_configure(&ctx->fs); } -- ffmpeg-codebot _______________________________________________ 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".