From patchwork Thu Jun 17 02:31:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 28459 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp208307iol; Wed, 16 Jun 2021 19:47:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvfK8hKvvEqvIesyhoAZGcRX/1OldRy+ymAK8IAwzxx+Vxyxro12d43k2goI/cV5+NijsF X-Received: by 2002:a17:906:2c52:: with SMTP id f18mr2654376ejh.258.1623898077745; Wed, 16 Jun 2021 19:47:57 -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 o2si4197418edc.561.2021.06.16.19.47.57; Wed, 16 Jun 2021 19:47:57 -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=TYUz6kND; 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 66E8F689767; Thu, 17 Jun 2021 05:47:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075049.outbound.protection.outlook.com [40.92.75.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7ED2F6881F1 for ; Thu, 17 Jun 2021 05:47:48 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UmUAjRtOM9mlFGrNaEZ49Y9v9YCiHNV0Fly/uWYxOKzpqFvGpePmyNcOLkYROOLQZM9ZP6hmHURVoIrd8/DKBoT1UFZ09g++QzHq6pQzgHVxbEoB9iu519w2JKwUqbxuV/HCZN4ORhM2S9/fd0NASCNuG9K5SdHuQ113Aw6SnebWNYZ8vrI6rB4/vTkqRCTfGPCHWOmN2V93+d6p/iPrYAsQo4rlkyOICZYXLzouSi9gb5++x3ZmHmjVshN2c9cTGJjm9796Ch4Mguq9m6IiLGImA6K3Y4VqB/w6ZEVOJUkZ3OiIXt3jKg+xEY2z+s1LQZxtVrz6eGASLvFAvWMvlA== 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-SenderADCheck; bh=cM5EzNoUumChATyYsG3uJ8eiJwoR/nDtNg6sjyOQ24g=; b=lWhnI8U46Y+kNd/4qJ04nwz55BW/XqA6NfjY7ONVJnIj2646018xsT7gBu1goBtidtATnkT5pub4DY4OixZeZ5dkHb+L7SUW5Dam+7clZbUtSEPwgvzbJQHJBn5QtqfflbxG0PAPEJMVg+mLPV1cQuc2vvQuywsju+FxKPHptAme2t4erDNJnBEn9w+EfBVjMZ58IQM4E/4EVaqAlxVENWnHwy/O+0Vu8sCV/NtWmj44gvhmdgl0bRsuR19ifuMm1vJJB2J14S51gXQ0D/H2RZO91WnFSVISvBsDbSByalZcP66FmS31KMraQ5b4ET/+NJc3yAnBv7EVDZIlaKOusA== 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=cM5EzNoUumChATyYsG3uJ8eiJwoR/nDtNg6sjyOQ24g=; b=TYUz6kNDqwiGRsT+ESlxSZIboUypw+nakWm2qINHRFbjNPukDGdB4m7UNBDsCrkAeA+RnyA0LPnavi/GuuNciEv23pc0Zr6cT+nEoAERbvg4+nKg5dNboEFrEiG4ZNzIio+xgSwAb6nR3oYmrxowp/87EjpTwyKA1a3N0Elgzuifuo5ewVT9LsI8kaqn7QZYpD2eEaeEHjcZJZ84vaH3JfZDGGEkxoHdnXWeW8iqJCDJ2Y/7rFqfJ8nEytrbWgXD82eY6rY0eGjbdfLYxEr0SadfYZNyou8ru0HLbi3AOVgpR/VOj6Fb70xtT7DZVpQoz6X9P7CR6keWnPbW3i/hUQ== Received: from HE1EUR04FT016.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::43) by HE1EUR04HT128.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16; Thu, 17 Jun 2021 02:33:14 +0000 Received: from VI1PR0301MB2159.eurprd03.prod.outlook.com (2a01:111:e400:7e0d::46) by HE1EUR04FT016.mail.protection.outlook.com (2a01:111:e400:7e0d::93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 02:33:14 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:94E57FA2B70128EA739538F2BFFA94E6DFF3FC02F8847255162B1E6FC8DC7C72; UpperCasedChecksum:C75B390E3E93AB15B9B48A1A828FFC55A2B05EC9D0206095D31877583F6106E1; SizeAsReceived:7584; Count:48 Received: from VI1PR0301MB2159.eurprd03.prod.outlook.com ([fe80::d9b:66ba:63ad:967b]) by VI1PR0301MB2159.eurprd03.prod.outlook.com ([fe80::d9b:66ba:63ad:967b%5]) with mapi id 15.20.4242.019; Thu, 17 Jun 2021 02:33:14 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 17 Jun 2021 04:31:33 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [aU70spXyH+nsl53GmVLKp3W0G12XAkrv] X-ClientProxiedBy: AM0PR04CA0115.eurprd04.prod.outlook.com (2603:10a6:208:55::20) To VI1PR0301MB2159.eurprd03.prod.outlook.com (2603:10a6:800:26::20) X-Microsoft-Original-Message-ID: <20210617023202.1318312-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.97.82) by AM0PR04CA0115.eurprd04.prod.outlook.com (2603:10a6:208:55::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 02:33:13 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: b7d0b9e6-4f76-4db0-90cb-08d931384189 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/ULuBil78Tl/c0OuVoBVXnkCTsCDl+Y8M3KS9SIDNbiRAEGDtGoN+9DqRxtg4ddIjMAzbTLCXyupdkkhF2DoxeJD4CRO672rSOZxUOrHYw10ZHU74J1UaOaG4dLIYwBvBuwX7qKSX7tvXrBQE+7H5l9hFj5AGFyfCt65LlE+0BANxZZ2tVi1uJlGaY/CAm4U6ITJ2iQR8QwSAUEAx00z6TcB80MlKwrpjEDX4ufIAy1yIIkf+wwFLinuFwvKqJQcEJTedSYsRBvBn6KIAaPnI6m0N8xAXYFojBXpVXbSVOkAmmNtNDJ9YP0e2xZ+s2c800rRd/fRDBif4rkckXHCQuXRZvmOCgdma3Dde5WCP/nHUmJ8iRcP202p7A5yH9faxglbwL8b8F7EfMKhjPMaUh5pwxQQdLR046aDQc487QDVVT7V/vdrLVvqMUHsuzALK0k7bBWxg0tQG27/rcF/Wvcdi5bLpYR8I85ari5FqEGwz5Z9njIYKcBO5lI7+WhxC/4VNUzEOZSTUItBP7P+6IpBESEeQ2idZU1pwl8WDkXCk9CfqZ+NPatZD4e9plGEdJSExQTUkhsXD3PdYBsfhNynwuiFAvibSl/1Cq5MHE19T+vGR6C4PL/hYoNkEup1vlvm7+msrw2wFYWQzH3vQl/Hbrz2VHDV6xz11tLyJwlXjdoectaOL1MmAOKu6qiAD0WFsByWK3T8ww== X-MS-TrafficTypeDiagnostic: HE1EUR04HT128: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yPfi7gyOGw/5MgjkzHFnb1dlj4DT5ixFGYRHh4b+J7PHKqEu3m2TKm7pn4TLc4KXBS5VjI2NKcwNu4tgujaP0G8nUOnKna6nui+U1GVdw+zhWBHwbnnwQJHctkNu8Lfb2gfClA+eGhHuzJ6Iwvly8tfJ3A8SlvpDGvLTLuzLzUI8EAnACmh+qIh0jNWJr0fHFHjvOhoDHeI0VdtnScFPS5L4ZJ/qHxOCPjHL+nErzaqdz1z+kU2js62kncnAxlT/HLm5CK+JehtzipjkGCX5qeguLD8XNcKjoLT8w166VXzyNbsJZGevaPX8y/z54ht4DJ4CuX2Y/7ZNMfD8SQxQyJUHV80gOV98hE6HOpRErjmurRacwleywjfNYTKMWicYUBwJNbiHDrT/H5lAg8nQvg== X-MS-Exchange-AntiSpam-MessageData: FaWo8D+2nw84nYi2yVGBXIOZLbDNza+0VKlOM7x0AnToAZMSlyJqpL1aa3Lxd+sqhQhO3oTAKYKUAewGApscME0ZLgwZblSYtOFPdlBKzIb9sy1LSeeOHKkt2E4ZKb8WPCO0chxAYxG/kyh4lG3ENA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7d0b9e6-4f76-4db0-90cb-08d931384189 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 02:33:13.9618 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT016.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT128 Subject: [FFmpeg-devel] [PATCH 12/41] avformat/matroskaenc: 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: zSHCUo/DJDiq The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 186a25d920..899a3388cd 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2829,14 +2829,14 @@ static const AVOption options[] = { { NULL }, }; -#if CONFIG_MATROSKA_MUXER -static const AVClass matroska_class = { - .class_name = "matroska muxer", +static const AVClass matroska_webm_class = { + .class_name = "matroska/webm muxer", .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT, }; +#if CONFIG_MATROSKA_MUXER const AVOutputFormat ff_matroska_muxer = { .name = "matroska", .long_name = NULL_IF_CONFIG_SMALL("Matroska"), @@ -2861,18 +2861,11 @@ const AVOutputFormat ff_matroska_muxer = { .subtitle_codec = AV_CODEC_ID_ASS, .query_codec = mkv_query_codec, .check_bitstream = mkv_check_bitstream, - .priv_class = &matroska_class, + .priv_class = &matroska_webm_class, }; #endif #if CONFIG_WEBM_MUXER -static const AVClass webm_class = { - .class_name = "webm muxer", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - const AVOutputFormat ff_webm_muxer = { .name = "webm", .long_name = NULL_IF_CONFIG_SMALL("WebM"), @@ -2891,17 +2884,11 @@ const AVOutputFormat ff_webm_muxer = { .check_bitstream = mkv_check_bitstream, .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH, - .priv_class = &webm_class, + .priv_class = &matroska_webm_class, }; #endif #if CONFIG_MATROSKA_AUDIO_MUXER -static const AVClass mka_class = { - .class_name = "matroska audio muxer", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; const AVOutputFormat ff_matroska_audio_muxer = { .name = "matroska", .long_name = NULL_IF_CONFIG_SMALL("Matroska Audio"), @@ -2922,6 +2909,6 @@ const AVOutputFormat ff_matroska_audio_muxer = { .codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, additional_audio_tags, 0 }, - .priv_class = &mka_class, + .priv_class = &matroska_webm_class, }; #endif