From patchwork Tue Sep 21 06:20:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30398 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp2133261iob; Mon, 20 Sep 2021 23:21:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbokDuU9Xm+5lTG12tM6dZCMkVPlcEMCo+RXE3jZqoYYpw7hgLYPqdJmflVucXFw3hhiUf X-Received: by 2002:a17:906:90c9:: with SMTP id v9mr31440878ejw.356.1632205294292; Mon, 20 Sep 2021 23:21:34 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c10si565426edm.600.2021.09.20.23.21.33; Mon, 20 Sep 2021 23:21:34 -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=@outlook.com header.s=selector1 header.b="MAg+/tjD"; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AACA168AEC9; Tue, 21 Sep 2021 09:21:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-oln040092071064.outbound.protection.outlook.com [40.92.71.64]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5CC8E68A8FD for ; Tue, 21 Sep 2021 09:21:23 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XM0h3BPZ7aHVrO9KUduqcxy7N1sFo3ilWOP9ZHjgiLfyiCOCXvRnrD7Pbw0E1eV6H3GCoh3c4KWxYpuPdovwjyfWjLVbb5c84rVOUC8QWjFNlW1L+PyWV8UUaUpKnSSd8/o/c6ESc21PHlPLpa/fHCS4uUppOsDNL6S8lAb2Y3m0flG+tbOzBmh8zG6oi77ecYz6hvN4MRxpV+oA8b9eOFuxklcu9X8e6Bwp0voRSi55CeXqaZ6iioP9LLaTJSraaDSmYjc0l8zVNUyoZmkhiiOvGG0UuT2MGE4060Wmdr7/fjImHeWf8xRca+oBBDhjriVxYUMiHXm86aUIuqPcMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BjEhU2bj+H3b3sXg1S8NrTkOa3ZZT6Z0y3qcXNB0Jqs=; b=UN1cWXyVotOAyVB12Rqy7OT2UWSHea/qkSL5HOq/QIbcX3y1JhfNLnu4ON6N6KdaYNuypsn3F3PKa6G6ELqUGVjHlCmjNwLHEBwvanztRSJIabt/zJDSvvqG3rGXnO7qLFoqwMxEUwhKtSsKchd4h15UteKEmsTwbLp051ui/4K6l5YY6IRSpzBuC/nKCm1KZ1TC1PNRpvlRIm3knhZNDawnKD1Vp5TGzs+QUd3AMhJlq1TqurRCWll6xmpyaggOK7SfIcAPSepmVz/7cIChfP4LCwkx5s2NXUCCrkXB70Uz1Vuvpv9ul8N6pSiz73UuSvaCLoxYgw/oPswxTYbpfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BjEhU2bj+H3b3sXg1S8NrTkOa3ZZT6Z0y3qcXNB0Jqs=; b=MAg+/tjDm7m1hVEVyGN8nqdu9OVVpGQeqWcphEl4t+ePdnK4kpAE0J+AtzpRrt1oeIykGvZtl7DxPdVqc0IJcFgbFoczhBRp6bfZ44rnGT8p9Pljbv4IaQhssbfH2oWM8zoOctVDIj1hPMs+pln2rK1IDgZiCFfgkukg808NFRWZBNj9XpUtbQgu4M3efI5mAHZYYPVDKLfveR4corgTNZzes+P9h3Z7xth1rWX+eAUjaCLLXgOnrxnym2Ph+URbI32WLQpK5+MnIctxH8VqOkd92V36REckdzRdxQj9/pkGNeMUVy3JQEufkB36xggO9POzMg4fqSlzDNUNcI9gVQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4950.eurprd03.prod.outlook.com (2603:10a6:20b:87::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.15; Tue, 21 Sep 2021 06:21:21 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4523.016; Tue, 21 Sep 2021 06:21:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Sep 2021 08:20:45 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [HoyYhKsF+z6rWrD0+HLlbsKbhPNIQyOa] X-ClientProxiedBy: AM8P251CA0021.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210921062110.3515104-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM8P251CA0021.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Tue, 21 Sep 2021 06:21:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 010bcd47-418e-41a7-a462-08d97cc806d9 X-MS-Exchange-SLBlob-MailProps: pxu8rxgqUgg+QLCWedic5W5Ieg+eObAijA4HFIr6mitqnexJ0u7k0hrNMhk6jzl2atdT6IT7+7Pa4FERL/7KVkp60pRV8si7JH13X3XiRBUIY3GdygOX284QPuylEDQg5VtWp7EIcD4uAiCSCxOBDmdLdyDIzdAgr2hPyGD8XuAROZGlyGaMEEEAwUV8AgEPUwkdfo1G/gKzLeq/jGE8ayJVMqT8a7x4EqYZIAQFK9DUqOXCFnycuU0nRbo7A14gLTsNDIA0CtzqoTRA6/ukTexa6iZZ5PWJFRSwaAtv/lu204gFWcoojDUFM9Y+y48zn18I0UG9NQn81iVe3xqK+mtUcVPXjKBtzEEu13D00ULvR7uoLr41z9jNDXg8GJJNI0VRg2ax4moWKTCMR6SkLznAIJf/hGNfkMS4385VgKueuITYKiUQfT4PxEAjTB5Aw0tQ+h5v6q/my4l3FoLVE1fEi7RYb+1lc9s93tFAVCGe8Z/PtgNPu91mFhJioaU2SFjqKva1FKJFb1dPsavsAbD+AsXG4Kz1nS+DHYT9Pfi0yMNvPb0lLa4TggwRr7hvNSk4H84tb270PH5aE2xhubEbVAK2WxGKhI7p3cCD2wT4SpFKQA/Fa4nDESl+CXsZCL7wH96fHfdtG+s2EUmwexjxWg12bt5OS8WCvspT1jAe6r0kY7SnolyBFoIJ9TqZFFppgGth8VY7imeNxr4mcQ== X-MS-TrafficTypeDiagnostic: AM6PR03MB4950: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AlF/2qWQU6QVl+6B/NmgdZIQR3vbffgZyj3ffCxrZNM2yH83n8ochKNi9MV3kT7EAJ0GPhHOkQXq3K7lmCNmtoOsTmSV9/Z/hPZYz2kL7ESKiWDLZICc6W82AdMwMOkfdD3/zzl9/4dvx4pgYHqIOXQqmR3BfNAEZo7ic3grdoGCVIOAhFsLH7cjRc1YfS1jlks5ro7LDqlhEZ0gPy3lU250X4W80VKP82RBm2d2eNc6v/TS0C3ICv7pdaWDSY7Aa4/YlwCDhzeG9L6UMNVf1GQW21fVsWzYbqYGaXOzocEHxc6pNFrsJv91i8NX2+1wgOqcwJ+/QSSBcnqXQkWnZLvZKXUFM38sdHysClG1NRiyUYway1zk+tq/eD3Ko1ZJyJoFfZQCspnYpH/srhTNkKMHdBf1pcPyIRj11YYyJ1OFzBe9KH0n/99r/DqpycfI X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5cELMgDIRKtQv6lvGyYi1Sc3H85yqWeEUapVvuYL5j2WpwV3AzPFmgF1VFu8TOa2hkXL5sOk2Dh3yZlAEEY5JshxeYzLLmgmhprMmuA3+giWAaParwJJkdczWEyAB5twTYzA2TwYv5BETa0dMisHgQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 010bcd47-418e-41a7-a462-08d97cc806d9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2021 06:21:20.2693 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB4950 Subject: [FFmpeg-devel] [PATCH 01/26] avfilter/af_afade: Remove redundant checks and assignments 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: MMF+J1GSbFCj The acrossfade filter uses the ff_set_common_* functions in its query_formats(), so that the formats, the sample rates as well as the channel layouts and counts of all links coincide. Signed-off-by: Andreas Rheinhardt --- libavfilter/af_afade.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index a55d5d72c3..3bd0331e77 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -588,18 +588,7 @@ static int acrossfade_config_output(AVFilterLink *outlink) AVFilterContext *ctx = outlink->src; AudioFadeContext *s = ctx->priv; - if (ctx->inputs[0]->sample_rate != ctx->inputs[1]->sample_rate) { - av_log(ctx, AV_LOG_ERROR, - "Inputs must have the same sample rate " - "%d for in0 vs %d for in1\n", - ctx->inputs[0]->sample_rate, ctx->inputs[1]->sample_rate); - return AVERROR(EINVAL); - } - - outlink->sample_rate = ctx->inputs[0]->sample_rate; outlink->time_base = ctx->inputs[0]->time_base; - outlink->channel_layout = ctx->inputs[0]->channel_layout; - outlink->channels = ctx->inputs[0]->channels; switch (outlink->format) { case AV_SAMPLE_FMT_DBL: s->crossfade_samples = crossfade_samples_dbl; break;