From patchwork Sun Aug 11 14:42:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 50978 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:1ff2:b0:489:2eb3:e4c4 with SMTP id ks18csp892651vqb; Sun, 11 Aug 2024 07:42:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZlUsXqx/8qAN+fc9XOxXB7CVx/TZJ2CU9PVgglmCe2lzHKoaGP5B3GpEEwUWIUeuEu6bKIDxgMbF5R2bXm6PsBJ0il3xiRhVgjQ== X-Google-Smtp-Source: AGHT+IG8NHQoOnOgCjGfulrxUN3e4H9K1I56lQ/1B4gcJjo8OXEIQRJMrrGhwrGPQKh6gGbG8eu4 X-Received: by 2002:a2e:f09:0:b0:2ef:18ae:5cbd with SMTP id 38308e7fff4ca-2f1a6c6fab3mr56440281fa.27.1723387350946; Sun, 11 Aug 2024 07:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723387350; cv=none; d=google.com; s=arc-20160816; b=CVjFjO2kvrFRalOKcUBhESAgmZGpMXscWJwHQwAHI6w0OOqJDmTVO9N6C1UJOLdQJO zaXqQEJtiCFOSg6u1gWLuoDyZeDZiwZx4hfD0L4I73bTiPOSU6tc5+0WWBk6YfidziXK J3Rksw4kV6yI2JesBiXOQKV+ud1E5eeqCDOlTRP+MiXT+SsITFOL2vOh9nRFljYSw2vp q+PH09/bTfhHHkFbzrPdR3q/FTCppC/KC/zE2xhfTlrKKAYyNf8iFhgPDecq8+XEPVPO +DRw2f5B5pTBmHCTHXCbb0PzVMBq+N7xuvaNF3gStmvhn226qFNw9emgxRQkPmIDiMM8 9Y6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=wYIcIBxCJRjNPHOIgM4EbDsZWBqM71eyjIFQTL57x1M=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=c37BtfZcQ2CncZsC4kBgmuSbD0sQhZtLTRCjBQks1DSueMIdnxSVIzodfrM4puB08l Nn/tQdrVszWAfLaINHUvoI9gnxehN7mrwkbOG2x4ROsxY5HkDD8T+bLEAQ8BD3t0NXH/ I+04xsJ5Xympw8QfTHaLQ8oFCO6eaxCkQF1Cnmf51KmsO+Pcn60aGYVU4WVXe0Y+/H9F NVIY1Mu5WnTLrwgMYYjaiwyMSYXK+uetw7hxmMp7RMIXG7Hq0qG0vg9Q+B2vSTGr8XkB WITkTwkqc1B5w8dCqYS9C8xjHxuCxTiaDOYqNfK6LKV5nO2xIZGK3INd0Mmo+7RJ499E wFlA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=sTvZRXer; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a80bb08c761si185193366b.88.2024.08.11.07.42.30; Sun, 11 Aug 2024 07:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=sTvZRXer; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0FD4668D9C7; Sun, 11 Aug 2024 17:42:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B1BE768D962 for ; Sun, 11 Aug 2024 17:42:19 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=sTvZRXer; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 222A74E02 for ; Sun, 11 Aug 2024 16:42:19 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id ZEQN0SG6KpN9 for ; Sun, 11 Aug 2024 16:42:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1723387338; bh=EQb1tAf4srGlyREn+IYYNhFivQnUhPXYUvM5k1qiK60=; h=From:To:Subject:Date:From; b=sTvZRXerMEhJw8HzCg4ir/6ogdAg0/aS8jCY3aYZf7pNOQTrm2pFI5H0efyGaphpC Dt6GykaBsZfglMLSGV11X1ttDwqZU8KYtMD70H9TUs+cZhRA6b53pgrO2psr5fbhV7 CgMF3+7YhZDYM8JRwLh31sFkJrrfSBvmDtWjH/DUDam2GyuGrCXiKv1duLwDMNuu3L ydxuRQkG0ZZdCkxCllykkx6fAF+J6y3BFCFkPn45UsrMGmZQmgGi9pIabwXZKl3k36 bpqOEBe6jFBn0Yxq7LftVBZ7fFYCL07z3cU47Q9wT6S6lOJuxr5SJVilUhKa2WZydW XfsuXM+epVIpA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 0BE9F4DDB for ; Sun, 11 Aug 2024 16:42:18 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id DAB533A01E9 for ; Sun, 11 Aug 2024 16:42:17 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 11 Aug 2024 16:42:02 +0200 Message-ID: <20240811144211.5712-1-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/10] lavfi: set AVFilterLink.graph on link creation 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: A2ABgwy3KYCs There is no reason to delay this. --- libavfilter/avfilter.c | 1 + libavfilter/avfiltergraph.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 2dc8820184..c4bd134fb2 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -185,6 +185,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, link->srcpad = &src->output_pads[srcpad]; link->dstpad = &dst->input_pads[dstpad]; link->type = src->output_pads[srcpad].type; + link->graph = src->graph; av_assert0(AV_PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1); link->format = -1; link->colorspace = AVCOL_SPC_UNSPECIFIED; diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index bd3bed9a35..2791ffa64a 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -1208,11 +1208,9 @@ static int graph_config_pointers(AVFilterGraph *graph, void *log_ctx) for (i = 0; i < graph->nb_filters; i++) { f = graph->filters[i]; for (j = 0; j < f->nb_inputs; j++) { - f->inputs[j]->graph = graph; ff_link_internal(f->inputs[j])->age_index = -1; } for (j = 0; j < f->nb_outputs; j++) { - f->outputs[j]->graph = graph; ff_link_internal(f->outputs[j])->age_index = -1; } if (!f->nb_outputs) {