From patchwork Thu Oct 7 09:37: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: 30963 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp1288149iob; Thu, 7 Oct 2021 02:37:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVnq9hNyshrDlEAUSytOPy0AfAmQ0Dc02/DHJGFKoDN7iXTZuH8gTeLa4JJEonqmK4GYGq X-Received: by 2002:a50:a2a5:: with SMTP id 34mr4874566edm.150.1633599472447; Thu, 07 Oct 2021 02:37:52 -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 c14si39980752edm.165.2021.10.07.02.37.52; Thu, 07 Oct 2021 02:37:52 -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=JTr4wJgJ; 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 EEAE568A417; Thu, 7 Oct 2021 12:37:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073065.outbound.protection.outlook.com [40.92.73.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBEB3680C04 for ; Thu, 7 Oct 2021 12:37:42 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k6NHprTKX3+b8QmXnD4Q+gZfxdkfToSvZD0eBO0sRPdHXjnhd2QzG3KLNN9SQxkBtfqYs/ULJu1qV3vErEt719XnKW8BRDITLjLayfoGvqsc6DslM0PQwpXVrgHGXXwNq5m6IXmuRzgv3sYn1btyaBo563i2DOTZTgOxqRgYgfj+YClKUgjNmL4xTvV7kgY6R+h19zsovXSVyk4dOFt6OrBFCsr1oXfUKZjxTVjgqXt8//2LGmsnQAJvOCVJb+b0tQgkORnHKHvs7H0/wvCXq4E1FujqpQZE35fKIINI7KLTgjxcfWFOQmkjDMNIO4OF4fp/OcGGY+V9/KLB6zh90w== 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=pVI6DAcCwRXLhN/qxMjv0FQhZ8yReNXMM3DBUTt/wmg=; b=jMAPuZn7+RrraQ7fq3bx+KaKc+0Yklx4dk+8Trsy/zLgFrumVjwy19WZ7gFgQHFD5ewvsu1NBoa2yhhuOywjnc05z8pKumKNgYTXaQ4VAdHbFpRrLG7Vcn+4I1txW3SPB0wDaOgYGh8ce1C+AX2JHLws7NpLjE+mpL2FOUIqBu/zBwdwx7i9FgdvJEZNdNsbs/MFPsdjXcnt/hvMGYLN7AOsMxaM2YyzX2UilFMmHVkkhmMOYMPlkHfU1ek4M2jyLJAVVAuhNeBk6aOiv792jQ/mzKcuh+zh8+xTi5i35k6phLeANEq6Z9pN8D7OQxDH4pIwlTtRDAKCwOXIK1mtnQ== 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=pVI6DAcCwRXLhN/qxMjv0FQhZ8yReNXMM3DBUTt/wmg=; b=JTr4wJgJmtxfpuMc0pwEYyJU1g7AnF6tJCNqOjfirJOceYbhjHvGrWrXWCqHVOkUc1byA6qvbson8RjWulFwqwX87Os3eEwhl5STKITjnlUL4+nVZzLVYWB/Mg9Ek+ZVxYwIn15zsLnRXX2d+HOrtovHkIbeEQAKb3d/OEMYbLI5TeacZJk5vV3PM8zb8UGZ/l1/jsNL/mOowHeSE3vVcNDFnXhUVTJ0LVFC59Vo7rcQa6i/cqx7/A2WuAhX623GsAxZLpBBqwxOdNDjpzEGtNXCg39tSygj0PFqnwxuk8vevHf3xf+oBGbnGCEINjv8zruXRgx/vIqs2gDZQX1PTA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4375.eurprd03.prod.outlook.com (2603:10a6:20b:5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.18; Thu, 7 Oct 2021 09:37:41 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%7]) with mapi id 15.20.4566.022; Thu, 7 Oct 2021 09:37:41 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Oct 2021 11:37:33 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [Dtnh1B6C0hgm7CRTefGJ8dMuF4ADYS3P] X-ClientProxiedBy: ZRAP278CA0014.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::24) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211007093733.685854-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.193.170.49) by ZRAP278CA0014.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Thu, 7 Oct 2021 09:37:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a62e034-e6a3-460e-dc33-08d989761b7a X-MS-Exchange-SLBlob-MailProps: f36zkjAOy3XbbBpNvm1g/7G4vT1kR4YeeBY9mRamAAPxonecz8o4SJOChbz3WmeTv+G2mkuZWwOfZXtXd8WnwhtsX337MxVqVeFH9wecctjAeKmmxKNfXZzPRLFZgNNvT2SrxmJ9kdOdFusJ7muXmkd+5NrHDbZ3vO0ntgQ1ut2vf5aDCo0VR6D4urUllgoZmF44Ey9nt44ih5X42Hd4o3ADVfipVcdxcwLgQinTM2VTms5czsvBsrUJjM160A7Eb6vPN41XJv91PEu/oFzXmw2GGW+r1oargWJFgKNXxJQ2QeyYeOJcrvsovtTEuph+n/q8GqlgP0GAHUrMwa/IBJTWVsgZ7VbzlbmeMcNM1hvo4nZ+FFd0xKMX6fGrzanDOvtnIDfdnK5lEY48qO9vU9cqYi17kdUuJfA+4Nv8cSlX6XicBuW7BvE/+3gVedzMeC50m5oppOyJh5/mT58yWq4VqhgvFlr3XbBB/i/Z0ql2pqAPIvRBSttjsfRCnR/LGgY6grbH2piLnzUjiFS/ZT7nBTgLk72p+WEUS3+/v3pPvC+ViBriFvvGBufWT3iPvG9zAVk3HvEdNF9kMnDcLGbMzIWEgOhl1zuiSjqR28+4Azmg21j7z4fKeXeJ+APoYkor7CAjfBMfjQlTVB63v9bh6rYyEvakKlh+aL093nShZyV6orWgiARCMGNH4+PgNPPAsMzo0cyoJdpiTFDCqzmI8H3g+WX3ZsEunTC/H5M= X-MS-TrafficTypeDiagnostic: AM6PR03MB4375: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D5l05BPr7N/wWKymshxIioS9acEF/a+EQpGNlGSEqosyTtq1Mf0rEp4vzgOAWD84U8C8bIS+EkzveUixmhJwehsuABg4g3fJ6uannEhStR8ABl8gWqTFdScAulH+M4KHNq7R1qHdWP17p1BtO5xDvRFdOpqxviMFkVNpAYTLWBgrja1isCEvc4vrQbWXELezlFFUSo0edc0THOpwHZa+nA2oX5iAo7p6Akig5Yff165I23btujs/Im283xRtsD8AoWxJJ8acrXpH2kH0jtIAAn3LN77oDEDEun9/DBONZkptYUB3sEz8Nx2zD2ziURnRUthFUgS4ax5IR+W27ifjdHbw5A9IEoY6KYZQGpPlSTZt75f/n3de2zZIhPQfDs3/2owG8Mbl+75/XuT/KuuFFod9B5YIcM/EjKyBfHZmtYQc+qlvQGmTvdljv2mg0ijT X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D+sLihkFYx7lDcbeGIIP4A+qtKQ+T9D3FBYRlTu6n2se1DIZtgFsAY8HjvQUFZpRZYyNITAfnLOr1RQBBtJg9199TjCjZJ9ei3ZYXTmPZ9x9ZZD1ObN7xPWYW1dflQto7FcqxuAjDJDYsWFqmPqIYQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a62e034-e6a3-460e-dc33-08d989761b7a X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2021 09:37:41.4000 (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: AM6PR03MB4375 Subject: [FFmpeg-devel] [PATCH] avformat/format: Improve const-correctness 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: dSoFAjc6m5Zj Signed-off-by: Andreas Rheinhardt --- Will apply this soon. libavformat/format.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/format.c b/libavformat/format.c index cc214741bd..387627009e 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -52,7 +52,7 @@ const AVOutputFormat *av_guess_format(const char *short_name, const char *filena const char *mime_type) { const AVOutputFormat *fmt = NULL; - AVOutputFormat *fmt_found = NULL; + const AVOutputFormat *fmt_found = NULL; void *i = 0; int score_max, score; @@ -78,7 +78,7 @@ const AVOutputFormat *av_guess_format(const char *short_name, const char *filena } if (score > score_max) { score_max = score; - fmt_found = (AVOutputFormat*)fmt; + fmt_found = fmt; } } return fmt_found; @@ -121,7 +121,7 @@ const AVInputFormat *av_find_input_format(const char *short_name) void *i = 0; while ((fmt = av_demuxer_iterate(&i))) if (av_match_name(short_name, fmt->name)) - return (AVInputFormat*)fmt; + return fmt; return NULL; }