From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0CEEE42ADE for ; Thu, 14 Apr 2022 19:33:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2016F68B443; Thu, 14 Apr 2022 22:33:42 +0300 (EEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074101.outbound.protection.outlook.com [40.92.74.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0434568A380 for ; Thu, 14 Apr 2022 22:33:35 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iUOxBn/AsjUnqS/ahuzp/bTwlshG9Q7ErTKJ+ih7dOuX2BAdTf5IpmTk4tMtr37F5Dtq9R6qEjwOgqDp6ac1dWwyeiI9ywR6CpAhl3O1cPtoDhS5bgYc7U4IK/42G9GTOc4Lt4ZkvcbF+v6Dq4r4EwoBrS5zmb1OIIbi1C2O0UZjqdcpuW0+xOYys5LZGH6ngT5Cfv1wNrfk0RctDtusZkQwQymwNqX1Bq0GtPv7jTIF9fc5j8jjYxbkNYmhMAykKy7rFG7YlzYy/Vd0nPIFa+IwLZIZur4JFdW/ZEFWptkvUURXCiGX7MBk6d3Cg+9ggPmCH4QS5ZZKNX+kKG/zNQ== 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=kvRGB1G2uLNiSgwvx9AMWiiNom8ECXWYb9/BIELMQ/0=; b=aJVUlzm/wFpmI4M1o8cfJJU+iHlHeEhy3fQ3eD7lfxCY5Z09CM8llnYA9gt2di4Z6l3+3X8FyOJGdBqWiIT17lfWliw5HL0ahaGkvXPyoCRJZOVA1pXrhgJkr+1H3IUOn3j6rspTh0WOUy/Y15UexK7bm+9Uk5KXQgJlpZ8nxqPg1wAlKnRwauUFASmxMW4HuiWUdQIYExqjVfG087hqLS0qK7aE22d5Xkjnww0kXi+kB7T6cTeXfTZbzDxJpXgNa7PZffscplZciPU5rocOzg3nG8/eK085FDf8zdtQe4zjz1nEahhW6iN/BUIzRol9yYfV9VAxDm9c6A0YTflDuQ== 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=kvRGB1G2uLNiSgwvx9AMWiiNom8ECXWYb9/BIELMQ/0=; b=s0jPeaIt2zQjgmQxr3+V3nMzW/t8gHFMMYqEfRJOrWl5TC808Prglrd6F1d2S0ZXPJu7mkTwR5kP83t8xwTaW8TdWTrLtDI0bLt/K5OsIXrRtFYNqkcSK4vgStEwvI8oniV6pSuzVavHtgLHnI6xTkDNLA0hJ4JUBQ3zh2wAMiHHdVR2KlFge2VAIpk9gkmnIQbQAqhLApVYTfyKQne0AsTwkLfkCYDYrLNNoeIRVTthghSd14aTfkecRlKMb0xYYSE51PhTaCuJWV3355sPXaR3mwUuYJ/UmErdhFPBApNvicpHpWBBHS7RDyZNcbrm8TB48M9/QLG/za5hy+MUNw== Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) by AM6PR01MB4867.eurprd01.prod.exchangelabs.com (2603:10a6:20b:35::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Thu, 14 Apr 2022 19:33:34 +0000 Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::fcc3:1285:374c:9b2]) by AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::fcc3:1285:374c:9b2%5]) with mapi id 15.20.5164.020; Thu, 14 Apr 2022 19:33:34 +0000 Message-ID: Date: Thu, 14 Apr 2022 21:33:29 +0200 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org References: <164872705467.19727.14353472036844305245@lain.red.khirnov.net> Content-Language: en-US In-Reply-To: <164872705467.19727.14353472036844305245@lain.red.khirnov.net> X-TMN: [Bpkc6opnP4py3tUOhjvsCIqdyTcEp+pO] X-ClientProxiedBy: AM5PR1001CA0050.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::27) To AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) X-Microsoft-Original-Message-ID: <521963f5-7d18-c66e-59b1-6dc5cfd5db3f@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b27b85e-af46-4887-5f8b-08da1e4da9a9 X-MS-TrafficTypeDiagnostic: AM6PR01MB4867:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /+U3rnl7rmJdy50xqNdWgIbptY+tFgdkhftPJ+70qMCOwINZXdMMLA6rQxfkidA62B5OGNufM3bqgUdXq2KDGuLfX3+/Udlq04vXSxz+wtgjQ6n6cGl12z5E0b1ejwpc99WIMZZS/XEkTPjkn44fqSyPHebhm7LkRG10i/LEeivf4k1p7Nx+2lp6u8Z7KEA/Cc9dTYVs6mtx6pXVDCIYolhQ3d1pq1Q7uVoKRi6FDN/8lLHq4KZMUmAUItQwmXkbwvRK4D8Dx++avM/VuE3BGLqFm2WfNkoq4bh5zctJRj3hqFOdzpD8YJ5QNLLx58uT65MEstIcuWnOVG/qWMYMvBCsCKP56uyA+E7bIBglf65Zn/HFMugvINsw2UYWfP5cBE/DWt2Z5KTbj1QeMLdPUf4xztXLQeRGaPx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Z?= =?utf-8?B?SlA4UHcwb3dlUUhzMlRaMUhzcEZLYkl6Vzk0Z3pjU3IxemQ0bWpDeDFwUXFr?= =?utf-8?B?TE1UNTNYdVhMbU5qRzVQd0l4VmU3Zk5KVmVVZUtrNENQSVUwckRlRU9CaW9U?= =?utf-8?B?d3RkcjRwdFhVbEkzdnh6Y0ZCYjcvRUczakZITEpFVnc5WkJVRVNnSGUybnUv?= =?utf-8?B?RVVnWS9sY3hTSG1OTTNiRUdrcmoxMHJMV3hvRkdsWS84WFRodHNiSFg2QzVO?= =?utf-8?B?d1pzSm8wZDVJVzU1MHRIWHRvM21KWS90WlcweWlacDRmQXBOTmFza25iSWN1?= =?utf-8?B?WExuRTM1c2Z5STdDOUtzcGJnTzhGRVVycTdBb29NNVVKVVJMVXFzV1UvSGJC?= =?utf-8?Q?wNTqCn1MHbj5a4EBGwzOlcT4+xOHxO4Q?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b27b85e-af46-4887-5f8b-08da1e4da9a9 X-MS-Exchange-CrossTenant-AuthSource: AS8PR01MB7944.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2022 19:33:34.3172 (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: AM6PR01MB4867 Subject: Re: [FFmpeg-devel] [PATCH 6/7] avcodec: Make avcodec_decoder_subtitles2 accept a const AVPacket* 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Anton Khirnov: > Quoting Andreas Rheinhardt (2022-03-31 00:49:57) >> From: Andreas Rheinhardt >> >> Signed-off-by: Andreas Rheinhardt >> --- >> doc/APIchanges | 3 +++ >> fftools/ffmpeg.c | 4 ++-- >> fftools/ffprobe.c | 2 +- >> libavcodec/avcodec.h | 3 +-- >> libavcodec/decode.c | 9 ++++----- >> libavcodec/version.h | 2 +- >> tools/target_dec_fuzzer.c | 4 ++-- >> 7 files changed, 14 insertions(+), 13 deletions(-) >> >> diff --git a/doc/APIchanges b/doc/APIchanges >> index 1a9f0a303e..326a3c721c 100644 >> --- a/doc/APIchanges >> +++ b/doc/APIchanges >> @@ -14,6 +14,9 @@ libavutil: 2021-04-27 >> >> API changes, most recent first: >> >> +2022-03-30 - xxxxxxxxxx - lavc 59.26.100 - avcodec.h >> + avcodec_decode_subtitle2() now accepts const AVPacket*. > > I vaguely recall C++ having a problem with such changes. Anybody > remembers the details? Do we care? > You did something like this in 0a0f19b577d54ff2e72cc9a0fe027952db83f332 without a major bump; IIRC there are more instances likes this. For C functions, the signature is not part of the exported symbol name (as zhilizhao already said) and the ABIs just presume that the caller and callee agree on the signature. Constifying this parameter does not break this, as "pointers to qualified or unqualified versions of compatible types shall have the same representation and alignment requirements" (C11 6.2.5/26). Ordinary API usage will be fine, because the conversion from AVPacket* to const AVPacket* is safe and therefore performed automatically; it requires no cast. API-wise there is only one thing that might cause problems: If one does not use avcodec_decode_subtitle2 directly, but via a function pointer like this: #include typedef int (*unconst)(AVCodecContext *, AVSubtitle *, int *, AVPacket *); void foo(void) { unconst funcptr = avcodec_decode_subtitle2; /* use funcptr */ } Here the initialization of avcodec_decode_subtitle2 is not fine; for C compilers will by default emit a warning, for C++ it is common to fail. But avcodec_decode_subtitle2 is the only function with this signature at all, so it makes no sense to use function pointers instead of using this function directly. I don't think that anyone does and therefore my answer to your last question is: I don't really care given that ordinary usages are fine. (Notice that the situation is different if one constified a level further down, e.g. by changing const AVCodec *av_codec_iterate(void **opaque) to const AVCodec *av_codec_iterate(const void **opaque) as there is no implicit conversion in this case. So the ordinary API usage would result in a warning or error. Might this be the reason for what you vaguely remember?) - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".