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 34E1A4B3ED for ; Fri, 5 Jul 2024 19:38:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1341268DB2A; Fri, 5 Jul 2024 22:38:52 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EA17868DB2A for ; Fri, 5 Jul 2024 22:38:45 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 16E67E0003 for ; Fri, 5 Jul 2024 19:38:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720208325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L4EPhn2zS1e1XssptFIvZA1UHOhPbwBHHmZUhivyFvY=; b=LCfV/VM5KCCWJmCyQd40h9MjK19YgF+kTnKxGy0nefSIuk9r6i3Ups9VhFHcVlJMtxWsba u+nA/3/dHZ0dbtS+cIkya5AN11ExShrsOLNLF4uL76KspRoJjqAubsSGJ7lwHWaQviS8dB Pjd4HSQP5IlEv4jJ1X4EvGDbB2Ovtsh5y4A8eW8vKnQMf4CvqXoKdiw71KbojF7p/G3rJ0 b/WfBrksM4tXf2WiuRtDJCCRBS1esIHIUJjc5mQ5Mh8aYVuEaUJ3psV/NOI/YozyR0pPCm NDRc4OE4TvsU5II3iAdZKRfYQO8yrh7YE0L+25pa4rHtcKDPaGPPyOFupkKbAw== Date: Fri, 5 Jul 2024 21:38:44 +0200 From: Michael Niedermayer To: ffmpeg-devel@ffmpeg.org Message-ID: <20240705193844.GI1904408@pb2> References: <20240308070618.2B9D0411B56@natalya.videolan.org> MIME-Version: 1.0 In-Reply-To: <20240308070618.2B9D0411B56@natalya.videolan.org> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] lavu/opt: add array options 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: multipart/mixed; boundary="===============2942461181980081315==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2942461181980081315== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="00hq2S6J2Jlg6EbK" Content-Disposition: inline --00hq2S6J2Jlg6EbK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 08, 2024 at 07:06:17AM +0000, Anton Khirnov wrote: > ffmpeg | branch: master | Anton Khirnov | Thu Feb 8 = 08:50:18 2024 +0100| [efe447877811f2f14f814e80ce71383e2f056f36] | committer= : Anton Khirnov >=20 > lavu/opt: add array options >=20 > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=3Dcommit;h=3Defe447877= 811f2f14f814e80ce71383e2f056f36 > --- >=20 > doc/APIchanges | 3 + > libavutil/opt.c | 360 ++++++++++++++++++++++++++++++++++++++++++++= ------ > libavutil/opt.h | 56 +++++++- > libavutil/tests/opt.c | 49 +++++++ > libavutil/version.h | 2 +- > tests/ref/fate/opt | 35 ++++- > 6 files changed, 459 insertions(+), 46 deletions(-) [...] > --- a/libavutil/opt.h > +++ b/libavutil/opt.h > @@ -250,6 +250,17 @@ enum AVOptionType{ > AV_OPT_TYPE_COLOR, > AV_OPT_TYPE_BOOL, > AV_OPT_TYPE_CHLAYOUT, > + > + /** > + * May be combined with another regular option type to declare an ar= ray > + * option. > + * > + * For array options, @ref AVOption.offset should refer to a pointer > + * corresponding to the option type. The pointer should be immediate= ly > + * followed by an unsigned int that will store the number of element= s in the > + * array. > + */ > + AV_OPT_TYPE_FLAG_ARRAY =3D (1 << 16), This sounds like it suggests undefined behavior taking a pointer to a pointer of lets say a array of float and adding 1 and then dereferencing this as int is undefined behavior A pointer created that way may not be aligned correctly. This just happens to work on the major platforms ... Or said differently a int *array ; int array_len in a struct arent gurantee= d to have the same distance between each other each time. thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB He who knows, does not speak. He who speaks, does not know. -- Lao Tsu --00hq2S6J2Jlg6EbK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZohLwAAKCRBhHseHBAsP qxVHAKCKBq+OpkG8VhMp6SKzm8zOEyh2GwCfZcJNM8WG+ki5NMKLQCw8JErSdL0= =otE9 -----END PGP SIGNATURE----- --00hq2S6J2Jlg6EbK-- --===============2942461181980081315== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============2942461181980081315==--