From patchwork Sun Sep 18 20:27:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38029 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp858826pzh; Sun, 18 Sep 2022 13:29:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5LPrDW5ayTbb/TEIb0dDi5eM3gdXZq/EEl2nl4DE7camJT9JbmS1evCDJ7z0felqHbiCAe X-Received: by 2002:a17:907:7290:b0:77a:27ef:18d3 with SMTP id dt16-20020a170907729000b0077a27ef18d3mr10624448ejc.42.1663532964250; Sun, 18 Sep 2022 13:29:24 -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 d24-20020a50fb18000000b004513a465ec6si6966477edq.94.2022.09.18.13.29.24; Sun, 18 Sep 2022 13:29:24 -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=WqqZYsuF; 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 73F2C68BC3F; Sun, 18 Sep 2022 23:28:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2081.outbound.protection.outlook.com [40.92.91.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1E90768BBEF for ; Sun, 18 Sep 2022 23:28:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GQ7buTQKcJhNXm56QIcGLe4KmxUpPAWJvx/QELxomUv6Qyr72CFjkaBjnvtk/zzJHo/snwGliihNj1lvA3K8PLmCDgxUvR0x5Be6Cmo5vwwSD86wIul/jdeL4XBbTCuqRTyL4kAGHeoB+P/2/C2T5L3hc6gS2fdxlHuzSJcQGDilQu8HOtdW2S8EtuabFlmX0RANg0b5rKxmD29x9o6+jmiYpI/vqFA3B/PnSZed0lVO+QLTFnUcDTWLU25wTRcDoqmpY0FfKTcLsbpeWVNPnUFFIlLNUaWqjsOVCXy19qZVGMrcc1fRfM3KOxQWff8Ef7Od3iKwBJO3ha1F8ibhvQ== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Uf1hqmzdzC8C/kp9JoLpgHC69mpIDwZZwmlUtNs2748=; b=VFo9P4lCNXCsw3lvlJQgdJ/UyU7d8QQ8BprzarAHyetlmkpjoWEdBWKA8a5KsI5Nmhlz46ugW9zQTzZf317ahlgk7L+yc8nu/yk0KILax7TKB9x7d3sFS0FQlzuXS/0KuWCOL4MJ4m18YRpTzEcoZxg6e777XhrZ2PswRGlx+Ezg3TBhjPeCBK4ue9Qia/yxnJ4LMAcVn1+8S9RFORk6MP4GEBxf84/yuJFEoWc7RvfHfNknU5I7UwPuiCcBinq9zl7sBIWmYWl18yPRw8RLNPAQJnWx8W/5RZslaJAaHr9U+7jNEejqRBuQPB4quFX8fFFNxKfm7j2Qb441epf6XQ== 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=Uf1hqmzdzC8C/kp9JoLpgHC69mpIDwZZwmlUtNs2748=; b=WqqZYsuFcFruFEvtD+rOyAfSkMBABxa+RWeC3gn7sQE1kuNgFCT8arXYMKunliwmg9SmTtMEvjRW0GX814mCHkrZr00+1mAeUhqC7jVBWHJgvlGY18IW9cRt+Uh1pVY4OJZh/PJKouIwCGnQMakJ4flnTBA2Z3oPeIekJuO7wbs6ZXQKOmqjB+4xGqkrW5/UKilbids1gB51Z8b7XlWdFaS3/Zs0gjg9MDXxHzZPVupUkSImm5ti7NeY3XRgiHSOuGfaVIZPsOVElNRLfwDPEjM4xX9uueOKCLexSFsTybwej915SketSC1IT9TYldVr5U4nvDfpBdQGKuy/AhQo8g== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU0P250MB0484.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:34c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.19; Sun, 18 Sep 2022 20:28:17 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::f3f2:4362:56:4785]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::f3f2:4362:56:4785%7]) with mapi id 15.20.5632.019; Sun, 18 Sep 2022 20:28:17 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 18 Sep 2022 22:27:51 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [z2QSWCobjZWQvG1o+wQLEbjUzrR+fr2fVPDdgGLT+H8=] X-ClientProxiedBy: ZR0P278CA0109.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220918202757.2345415-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU0P250MB0484:EE_ X-MS-Office365-Filtering-Correlation-Id: d6a6cd31-9c61-4608-fe82-08da99b4520d X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmo7HDJh1DrTtIyfVHMwSN51WtqHdXi8z0Hv9REyTU2avzB+e3YxZPchFGqUi2aCOnS14TdqJ6oWRIMXSIjoFleiKfrr3umKe2oZMjKzydo9U/O1xWGyKblIufxlBq7oaMGK6qL3VwGxaUbxF6fzCWFxrYc+poTmRnU9Ug5eJiD7MC0f/LvmHaGULzuY2tk6b0dODgczV79l8g285c5jtYU5TqBaBvxgAI+Ua7R0pTsC+fQpzC/DU+CXBvJhGbeSKOmWZou5/KvwBrP0h9zAOUd4ZKJU+jBPfuctVtaW6SNCJPkApYM8C5C+0U117hszlZxs0E4LUF9nQcBZ5wsL2EHJEosKjR/kLUsGzsAmEe6n6q6hROhGts0AL8i2Hut457jq67+GuSt8cVyUHBmOop3NLDirmWoZtyYqbdqLSPpyVSQbuGTRA2ofGqr6DvwsVedvkPue55Uu+aNW50xmfNUlE0K8hgXW8QGRp987/sv+w+BNRU1JWXmHXYeCTyiOaJDEsmSAVPqJAASRhTfWStyMj4h+yFnayAEAJkX31ZeTKyxR/NCyoD4nkbWixClCGJYtNU07ud0n9pKaqOPvJGqATZ2tI5+DYe/1JiyLdCtd5wMTOqz2lyT/bqTTEleGD1ql7Y8AFDea+4zKg0OH81Gos2RqjZCpjrqaXtkpaQ9gOSS1R21qphwsyBdnO80OaG7i5VVzOq0/VkMpXNu0BLfqw6KxQw22j/lqwLqZ8g+BuArk3X3V/1/tfXXWoa4bq0E= X-Microsoft-Antispam: BCL:0; X-Microsoft-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3QvDXTfvU0kKHXQkyu1hoHtcBZRwMcSTOg2VT7Zb09Inc7nsTHq/teaaJHLYyuC5zkGbBcwZ3TbspQoB2XcntiWlga0O1HXRFi6e1Quf9blM7jBiHaQCpbJOwG++CuE4fN6s/BHruzG7I7a40SPeygixOOZmz5uAz40JeFQ1FUFtCfMW24B3Iczar37Cc/UUDa2BOiZWDo5kMWUCNA0Ht5jUAeXOMQM14cFD72mGhRk8pis3aC9xqZTW1P5dDVmhavimW/4nwjKVj3szwGiVPsLo9sM3BJzPWEB4x6ggeo1HmhChgCMTxnFcuvXrT8NcOTsUu4S9DlWGCYnW6Nc9+PI5IBJCDwewsM3XjSO49pfGbRx1xxlXbPjh/OLRz4qrfaz28+GTnQgeug0wbcjxTraePZQVXPdGNT9Mula/xekze254q8jOZeoMd4pJoWiVGnsfRQQ2ByFZ+WeH57X5/aWLKZCs8W66YtIouHGX//WGDB9vqE/I1cwTr9ah+aum85LG+dZr0NIqmPTlbyP9srIT1eLLI5gNfEhknz5q42SkCvBc3PxfAxinYeXvMgznbp6oBrFHOyMediy3bqEQnRJoC8v9dwBOH8AqxWyaiiU2kEMJwh7so//LX4I/3IhRo2r0WStiJzZ0lrVz2nvISLq1wTxjen8bnnoQKKk851wdaYLNHB0FIaBa1hBuOAvXk84wHREy7yJMSsiqcdQ5iABk8/xRbhAUDTC92lQnaDrkWnOKhFzKnc3YCZpCxXH2XR6UfwbuEoAMywjqOeEttamnlWrbTQn6r0hk4aQk+oMqhQsABvbjZ++GQFVT+W7HW6OW3lutD1vueqS10e7J5PmS3Jq85FL3htDvR9Npa1WI9blasBsITn5GlbB7Fcmpxrcx6qTPFD7kPtHKlT/ZRmN8SB4HfcONufppin1KeCCpomA+O85+/6eBW9dLCGVwQumS+MGszsUgOgyHG7ENQcVYfUBVtaSn8WeYhsyz+lZafi X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6a6cd31-9c61-4608-fe82-08da99b4520d X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2022 20:28:17.8345 (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: DU0P250MB0484 Subject: [FFmpeg-devel] [PATCH 11/17] avcodec/libspeexenc: Remove dead channel count check 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: X+le2e89INt+ This encoder has AVCodec.ch_layouts set, so that this is checked generically. Signed-off-by: Andreas Rheinhardt --- libavcodec/libspeexenc.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c index 8d2c6347fa..2191e7dac7 100644 --- a/libavcodec/libspeexenc.c +++ b/libavcodec/libspeexenc.c @@ -152,13 +152,6 @@ static av_cold int encode_init(AVCodecContext *avctx) int header_size; int32_t complexity; - /* channels */ - if (channels < 1 || channels > 2) { - av_log(avctx, AV_LOG_ERROR, "Invalid channels (%d). Only stereo and " - "mono are supported\n", channels); - return AVERROR(EINVAL); - } - /* sample rate and encoding mode */ switch (avctx->sample_rate) { case 8000: mode = speex_lib_get_mode(SPEEX_MODEID_NB); break;