From patchwork Thu Dec 9 13:08:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 32248 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp344560iog; Thu, 9 Dec 2021 05:09:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHdMuNcp3UDjJEhJObh6Jxz7CA8w7vhhSJOC7qwtqfNH4BtTn69LRg0HfM5nosLrHdR30A X-Received: by 2002:a50:ec16:: with SMTP id g22mr27845040edr.214.1639055374899; Thu, 09 Dec 2021 05:09:34 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hz2si13408291ejc.386.2021.12.09.05.09.26; Thu, 09 Dec 2021 05:09:34 -0800 (PST) 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="c0/WyEyp"; 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 2D47468AFFD; Thu, 9 Dec 2021 15:09:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074044.outbound.protection.outlook.com [40.92.74.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C83E868AFF5 for ; Thu, 9 Dec 2021 15:09:12 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fR6YC6pFdLTO1S2Kr/d96heRYDwE8OQkSJNSk/SW4xVFb3JAGxyZHBqyf7kN3MZ4yYzttUDYWvjk9PQhy0bf+qcys3Gmn8niPuCYt4tLdhgHC3JNJM3171j51JrFjxYEUjpfqHrgFabnrnp+gdjeCjQ4Eg4t+gl3XNhYir02TkF3Xm9iCpIgCEbhe/hBWRmqeIQlBxSN7YZegnpcA3jT0xU3/HtY3R7LMDUFiCLPjfO7YEGdfA5EVG7BHRpipIOvGuzxGZ4f9WXw49zHyBnlN9+U6PtVccUe3Ci5bjGyXYr7d2EiA7BiYgWeXZ2IOKOW9j+kA0GwQ/4oL2/OFxbAEw== 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=EQQCNggKtKlPyqv+q97anTQB0fQFg8/Z7sPoERjuHCY=; b=I8L5xiDF9kPSMoYW5zesWX/4KlBTrI/l50VqWFpY7kgkWFpsOHmwHDTkdgrfruCNdg9I9fq4vQzbM2BTfardMIwrJnvqJOo2SMlBUWT3mL0lR6IPalrBDEvg33pxasJyHwSh75I0CXHILW5XTXgJXdA038x0LB+g4TnVg3IjePotcFKistBa7qZ+OTxqK/YPzK8ghqi7Z1MxJa2HrJ8D88tT12fgoSon/olQjLPjVDClorDIBJZOoauJJn0SueZfanKXrN/BvPSGMBnuxdk5MgA3IA4wqg7aOn8fl5U1HyB0B7/MtZmvQvvHMIriLRazI532sXBvJS7BJo2E/2NT5Q== 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=EQQCNggKtKlPyqv+q97anTQB0fQFg8/Z7sPoERjuHCY=; b=c0/WyEypGKdIIqr3kVBLvzCtQDiWK30aeAFOTDt6mjyA4dy1vep36aVDxo0CLtlcACVVGfyC88J7mIoPBr4Hk27BTzTRbhUkGlzuOycBDY95wyv83c/e8aGwzl02brEKHJ3LaQAwX/4/YGZytB83rKXjrzjq0q6uL2pXOdcNKz8lp9WRvnX0Fa4jPEgJPKOvnl7uLu+Vh4zSdmUhbcFmO3e2tDfsKl7PCRZYJhSp0RRUxZNi//bbumv+VK57DEaAvv351DxbgvrsMhXfky/IUra/3OZiik0QR9O8CYGrSBaxBYtw1kohr8jNiNWZ2glEtB2Mi1vOmzTumLqGzAmKsA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5048.eurprd03.prod.outlook.com (2603:10a6:20b:8c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.11; Thu, 9 Dec 2021 13:09:11 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%4]) with mapi id 15.20.4755.025; Thu, 9 Dec 2021 13:09:11 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Dec 2021 14:08:05 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [WT8CbxDRzNepTuKlr4ceTKG3C4gx+PNn] X-ClientProxiedBy: AM5PR1001CA0039.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::16) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211209130805.678224-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.248.74) by AM5PR1001CA0039.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::16) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 13:09:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a95d3271-c18e-419f-2851-08d9bb15171f X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/ULftefJ12YP+O9+pfRyTL+Vzci/RoCiYIg+JZ0c5sFJkhR46vZYG1C2i2Vh/RudC1LqIqW5qcOIpKVIYfXNWZ71FSRcpG7n69dEOGahJRkzliOfI0d5NV+6Bk4usJuyr08j87zgkm0YCCnkTAH+2xmPej6lNFHKqs3qHBOzdbXKAlHA3vIHU4QPlMj6E6peOpq6ClGebLZblAEw9aEWq1ohnv7+T0vvVncKmonjEgladDi8n8ivOfX0sHycIthjy2HOYh1zrfbHr/kiQSa7c4T8j1w2wNyxPu0uzRgTYFlZ0HJTwA4bGYeeHIo3SkH3QXyHDseV8mq1CWoegDOxHH4K3deJmKHkZ/u9D07pgxkSGVh0/k215TLosj2kmGAjlcVJBrGejpCvzblMdqWS6CLlCLSGBPAC+wB8D/yKyXjZ7Up0wX9Z6Wv+I8x/v6XLfIarwIUNDQG9x5ldV3fBnjBpsBaCCeiifZgBLWmuDjqaUEhoH5heco6bpsMSYQZw7Xd7qwOR5Q5Fvlp3FVDH+QY5Dp6Qfr3d7QSF5tRX/ktPor6JuAnWZdod1VTyEFmEgsrpkTawLIxrZNJEIAFKAsUVh7U5GPpRqLcfbJ7uPSm5hBxUN3gySspRF3XcAR4BVNENjCBA3i35lu68j0IUsxqNxXr3qRgtG6IyV8VYlYoZXXCsEO8q29v/WsUavxHWgtkWsUzMyqWjHg== X-MS-TrafficTypeDiagnostic: AM6PR03MB5048:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-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S1Pl+WK/+iL9Ewxj82KyZQwe4y/PCvPpMqHfYeBgWprIq6KcJFcySgAPXAtsdxdm0k+8qug6uoC1r1IDkO63LR5oaZhEDqhEo7RHrH+5BS6MRCkEJyjFaNsmQmw6oaPTEnvApAIQbWQzr9oSCTs5IN4TweDL6woU2ngxKHaEfSXEtbWc3PWLhaDLAojjGQVZT//D+HPcLr2IISEhFhXr0VIez5TGYBDGKsYTcwDJ5UNSp58mV8+ePimPic3UuLwhFoBfH0QG55/zo3KLT4uV1yv2J9an/YzWVHVUvAiFbecB5JIdD3BqjgNW4rYcDK3oUknKtlrsLAimUivTLyu23esvCjzGHmDFj0QbMMzBfSuvC5ZlvANpL1UKfs4Sbr/QbgDf0o9jH9AUUjgwv2FuJBtoUXcAIEPPFENdC/wSjvqnPnu8I4kcl0CpdbAR047TlUNAHYahhrP+coIROUV/IEujbd13blJS6SCw5Dw9FTTcPN+FGeM7mL4nwXiVuJcGnTx07D4pTpNvpDd5EVkt2QsOMhH2Pmid72SY7ZP4/Gp99w4Vehl71WHng== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a95d3271-c18e-419f-2851-08d9bb15171f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 13:09:11.0011 (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: AM6PR03MB5048 Subject: [FFmpeg-devel] [PATCH v3 5/5] avcodec/mmaldec: Deduplicate AVClasses 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: G6kEjfIjt2mu Possible now that the child_class_next API is gone. Signed-off-by: Andreas Rheinhardt --- libavcodec/mmaldec.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 0c7df0a0bc..f8a7319cd6 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -820,16 +820,14 @@ static const AVOption options[]={ {NULL} }; -#define FFMMAL_DEC_CLASS(NAME) \ - static const AVClass ffmmal_##NAME##_dec_class = { \ - .class_name = "mmal_" #NAME "_dec", \ - .item_name = av_default_item_name, \ - .option = options, \ - .version = LIBAVUTIL_VERSION_INT, \ - }; +static const AVClass ffmmal_dec_class = { + .class_name = "mmal_dec", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; #define FFMMAL_DEC(NAME, ID) \ - FFMMAL_DEC_CLASS(NAME) \ const AVCodec ff_##NAME##_mmal_decoder = { \ .name = #NAME "_mmal", \ .long_name = NULL_IF_CONFIG_SMALL(#NAME " (mmal)"), \ @@ -840,7 +838,7 @@ static const AVOption options[]={ .close = ffmmal_close_decoder, \ .receive_frame = ffmmal_receive_frame, \ .flush = ffmmal_flush, \ - .priv_class = &ffmmal_##NAME##_dec_class, \ + .priv_class = &ffmmal_dec_class, \ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \ .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, \ .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \