From patchwork Mon Sep 6 12:43:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30041 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3722445iov; Mon, 6 Sep 2021 05:44:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCiT543RCD4PiYISy128dfTFroT+OuhnbIV0/HlVph30nUi4jZHpTDoWNo92o9sk3M2j5j X-Received: by 2002:a05:6402:1b02:: with SMTP id by2mr12923391edb.365.1630932282202; Mon, 06 Sep 2021 05:44:42 -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 j7si6423673ejm.280.2021.09.06.05.44.41; Mon, 06 Sep 2021 05:44:42 -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="Zw1z/LUG"; 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 4C0F068A69A; Mon, 6 Sep 2021 15:43:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069046.outbound.protection.outlook.com [40.92.69.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CF3BD68A62A for ; Mon, 6 Sep 2021 15:43:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k9fpSLxY5asMc4pBKCFjq0QIIsVaglp13Njy1N93upWOel98nSjv8NCsQo9OPEHAjw7grRFGu40hevhG0ZauT2bIt6CfGOa44cS0gGH2PHXXGPzq3VT5DzEeb5BIcUEt+02XvPEz8nTZ0cwFnn0bGjbuhh71SjObEVas4gxSwljYVwb90y7cOvU8Cf2IL89kx7O4jO4iDuPwqG06FGSQyz/fRvILZQxaUaVbWSbG9LWUqOLb7DTXGEFr7qoiDMe/E749fS3MdX50Ql2O2BsUZv46Li6W3FV7Clkh7MjPyLIcVlPJbU1Jp/woDwRNQerp6qRVFRs3daWLIWQkREt99g== 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=0zRQZJ1i+QNRJQRDlIiyYvTvu9Y2kUSeSn/J4qEeYQQ=; b=HFfc8tLFrxOHiDWggKA82UBgri4qbmRABtxd1UR35OF6h5w6tyXqIRM1pFNFb5eqruRpq393QqO+ZFU74zAG94XKqsYpaxi/jjK0V4D7LLPUGt1GFxgeZhmJ7oJIIX6+Sp8GVI0LCxGyH4p75csWvo3OlqjXo4AVqXYFxLe7eXgnzG4R/DLJNhQdjdzQCFII9JTH1y5H1ysd2rgvHCMLDmxstkIQ9TfbuzT07QiOdr9fDpAFYdZtJMrb+GRCHQNxl/izY6FjbvVGijVYZAnU0a5DWjMksd2swbX813eFDAcd30TZ+xW+AB6bqG8ThqesKMWE5wqY4B7rbpgG4N7bag== 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=0zRQZJ1i+QNRJQRDlIiyYvTvu9Y2kUSeSn/J4qEeYQQ=; b=Zw1z/LUGB7FBTU1ki1/ev1VyJ41m+aMsva7/YkB+FSpuUkI0kE7BoeIgJhyyipHazhQLGADvrYnhiGcBhg3GBTTcl5gFSztymd26qs81YyoFXgS4xfIyd78JTtqfp7PTkIrI52PLelwtLr7iQ5upY84nEuS9NQg9oUoZgV8O5LJ+L6GhaY4ueKf2gWED/nH59J4GsFuNUygpB1x6TvR3Lp6X17bjwb9NhGuP9CXYSIi8yMBntvsruwlT32nGUf6YFA0yfW1LzGk5ilz2cEUIScenxsEN5EIuJh8/byXA6r9elPwCp3U8cRdOjsSNSANTbF9VmYQXP+xbJjxlRP/rfQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM5PR0301MB2515.eurprd03.prod.outlook.com (2603:10a6:203:8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Mon, 6 Sep 2021 12:43:20 +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.4478.025; Mon, 6 Sep 2021 12:43:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 14:43:01 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [dhe5kL+f4JiHdZTBYHifjToJr6FP2Vm8] X-ClientProxiedBy: AM0PR01CA0084.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::25) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906124301.4161498-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR01CA0084.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Mon, 6 Sep 2021 12:43:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1010f307-9796-4b5d-6e44-08d97133e81d X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWfiyriVhNa5oktltvv1jUtk6bVD55OMjig2oqrF0lYCvEbogc4dh64RC60BrT04LD7NRmnzgwd4ESwZ+UrzL9dzZvvgHdfCd0KAuuRyLiqZ+38A/BjYmHg1zruws17nkwF/eEHOG/4S5olUATyPd7A0cG+o3JelvBieK/cxFAYjeB+PdbFVuEu19O17FStBozUmdk06TiwgOszpLDn/tENKiAsRiYGRi9PJ8lOpMyhAwOxCwsuVpSYXGbteZFdQDStTDN7a9Co2sLIBjWL4ctW+8sxTZegJZQtP8pL6x7ic5kPQKuetf/8GF8hlzhNKiXqUuoCknrkk72Ft3mIr3Zk2DmPwgA5+O4WKjnTx/QwMU7SuzUDTRrVPHlQqwcuxFNUJWM3mtDcBRBYCl0mhvL2pb608XzA77A/rmUChsRu6mGQDi+SxoPZBlHYLmh8i28UvoI2K0EGLURJhioebFaeVZmBt22MnYmz0IrVkCDFn4rbBhleJoE48691be+G8t9W4q3tywuAYPTUbOBA1lvjeWzJw//2Tg9dvhkT4XOdhxAzGkodmvI+OCPTfDXuF2AWDM2L97soj5mxORXiNuyZwIQvd8ZQf14tPFYXpvLJ8poxGuvk8A0FtdRRJTghVhatGYM6Ddh7jsYiDOt0nqaWfjSRHcY3OGNiby4Jk0bRWtyUI9nKcnmGmYHXEwyhaa2H1ld6kK7tyIIm4WFkF4dK/k/dfFDsk0M= X-MS-TrafficTypeDiagnostic: AM5PR0301MB2515: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: duvWFh2Qr2rc+c43uARAJAz6V/ljdenSonChDr4h0rq58gzUd14JuPeZa/lZRUnpEJ3D8auDs5vdgKk8CKZ8wpZ3kw5wZk2DZnCIQLdt5gK8g/u7wtiQwAYO9dpx+bVZFxGLUYv+j/lE+E7vt1+RqzpqU+0oKxV/Zs0xBl9GIXsVvvxo+kghjnNnUvDwxSmpcoR+JYNNAoO1nqEcmPOTLkN3xHPh0yNVQBBx5PXA7RhQ2jBdrRyUeTlCL/VRyHkMMnS8ejlBaBcxzhjFqFNkWZOeF25mFGdCOkZgHU+Q39pQNdrvAh5ZPmOnghwd5fusuQhSIj8Q8fA2qU6lNB2kP5T2Tw7FwjSDTQLcXcvBjjke6ZYESNMuvfQ7VVfUt2vyW68yNxcPNfouhlDAOLmj52nwXp1Y40WBVTPutjjygSO4QQUP+2PRsbNBNSUDWSGe X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HR81KswNBR61ClTpsHZoXleUySD1gVZ1Vfxd/j2hdPiwVJe7Bhyk2kBpsYnjvcGE0+hDOc6NAMaBvohvC1f5x8ZMti56Qx5TKje1SyciagvlrzwbXU9XRWET1AXb2aAi6hf257wHThkjtgCOs1XE6g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1010f307-9796-4b5d-6e44-08d97133e81d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 12:43:20.3081 (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: AM5PR0301MB2515 Subject: [FFmpeg-devel] [PATCH 11/11] avformat/rtpdec: Make ff_rtp_handler_iterate() static 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: ThELmQ8hiaUG Possible since 61974537610d82bd35b6e3ac91ccd270c6bdc711. Signed-off-by: Andreas Rheinhardt --- libavformat/rtpdec.c | 15 ++++++++++++--- libavformat/rtpdec.h | 10 ---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 6b0da9e636..20fe2b82d7 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -135,7 +135,16 @@ static const RTPDynamicProtocolHandler *const rtp_dynamic_protocol_handler_list[ NULL, }; -const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque) +/** + * Iterate over all registered rtp dynamic protocol handlers. + * + * @param opaque a pointer where libavformat will store the iteration state. + * Must point to NULL to start the iteration. + * + * @return the next registered rtp dynamic protocol handler + * or NULL when the iteration is finished + */ +static const RTPDynamicProtocolHandler *rtp_handler_iterate(void **opaque) { uintptr_t i = (uintptr_t)*opaque; const RTPDynamicProtocolHandler *r = rtp_dynamic_protocol_handler_list[i]; @@ -151,7 +160,7 @@ const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name, { void *i = 0; const RTPDynamicProtocolHandler *handler; - while (handler = ff_rtp_handler_iterate(&i)) { + while (handler = rtp_handler_iterate(&i)) { if (handler->enc_name && !av_strcasecmp(name, handler->enc_name) && codec_type == handler->codec_type) @@ -165,7 +174,7 @@ const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_id(int id, { void *i = 0; const RTPDynamicProtocolHandler *handler; - while (handler = ff_rtp_handler_iterate(&i)) { + while (handler = rtp_handler_iterate(&i)) { if (handler->static_payload_id && handler->static_payload_id == id && codec_type == handler->codec_type) return handler; diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h index d54a05869f..5a02e72dc2 100644 --- a/libavformat/rtpdec.h +++ b/libavformat/rtpdec.h @@ -190,16 +190,6 @@ struct RTPDemuxContext { PayloadContext *dynamic_protocol_context; }; -/** - * Iterate over all registered rtp dynamic protocol handlers. - * - * @param opaque a pointer where libavformat will store the iteration state. Must - * point to NULL to start the iteration. - * - * @return the next registered rtp dynamic protocol handler or NULL when the iteration is - * finished - */ -const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque); /** * Find a registered rtp dynamic protocol handler with the specified name. *