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 2226D453FA for ; Sat, 29 Apr 2023 16:55:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E56868B74D; Sat, 29 Apr 2023 19:55:10 +0300 (EEST) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A256668B74D for ; Sat, 29 Apr 2023 19:55:03 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 33TGt28N000457 for ; Sat, 29 Apr 2023 18:55:03 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id D383FEB5BF; Sat, 29 Apr 2023 18:55:02 +0200 (CEST) Date: Sat, 29 Apr 2023 18:55:02 +0200 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <20230427142601.2613-1-anton@khirnov.net> <20230427142601.2613-8-anton@khirnov.net> <4d9e2ce9-fdfb-3fcd-bd7d-07d9bbe5860d@gmail.com> <168275927436.3843.3004003145439948494@lain.khirnov.net> <68e51019-d01e-cb87-7fdd-5da477045085@gmail.com> MIME-Version: 1.0 In-Reply-To: <68e51019-d01e-cb87-7fdd-5da477045085@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Sat, 29 Apr 2023 18:55:03 +0200 (CEST) Subject: Re: [FFmpeg-devel] [PATCH 08/21] fftools/ffmpeg_filter: add filtergraph private data 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="===============1340122981709146819==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1340122981709146819== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rSlgAddLNYIa/ocX" Content-Disposition: inline --rSlgAddLNYIa/ocX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable James Almer (12023-04-29): > History has shown that these notifications have had no effect on users, a= nd > even on this same project's developers. A good example was ffserver.c, wh= ich > accessed an unholy amount of lavf private fields (both exposed in public > headers and even internal ones), and first_dts from AVStream, which was n= ot > only accessed by prominent library users (One of which refuses to do thin= gs > right and forces distros to use a patch to expose said field on their ffm= peg > packages for the sake of supporting their application, thus making a pure > recompilation from our tree no longer a drop-in solution on anyone's > system), but also by ffmpeg.c, with no developer noticing it to prevent s= uch > code being pushed. Since we are discussing types for the fftools, not librairies, what people outside the project might do is not an issue As for abuse of fields private to a part of the code by another part of the code, I think you are somewhat rewriting history here. The reason the fftools used to access private fields of the libraries is not that developers neglected the rules against using them, it is that no such rule existed when the code was written, they came later. But if you really think we need to enforce the rule, then there still are better solutions than using a separate structure and littering the code with casts. For example we can apply __attribute__((unavailable)) to the private fields except in the part of the code where they are allowed. (The attribute might not be supported on all compilers, but it is plenty enough that it is supported on the compilers used by the FATE instances that test submitted patches and the compilers used by some of us.) This is a MUCH better solution than what is proposed here. Regards, --=20 Nicolas George --rSlgAddLNYIa/ocX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE6ooRQGBoNzw0KnwPcZVLI8pNxgwFAmRNS+UACgkQcZVLI8pN xgzaew//ZOZUUXFM56DUAan3U71g62lKRNfUL4VxY0SkOf5oh/N+M8BneFGUYRVC e6/pvSrSqX3UeIs4luuawvr2x8MT4e5rM8ULWvoRsfkNgjx+xXVp1fhi4goj8Jvb xbxX6ep9tZW6DMm5co85gN1MR43Ia0Erm49FsU+PCxWHW5xlW6OxfXAirHCkXXqV t29X/jSvUL5pZ0qg0kWte8xhrO04eQue/XsXSCzh3Fewc+qjV+QPjDSnex3b9CQ2 qAgOKZ366uM556GxfaZnTyQQJMsfIAOb9tlACZGQLlruoqUmzQxzCw1keHgzrg+J y7qItzswLhU/dMUcfYcDE0gr4nlXltU6+c6SZsUyi+gXbZNjDBy/BR1LCVv0GIRg CPRxlVEsiXfDOY1z3CjM4hDByvsMBIBw/ScLXqy9klDbquccA8TFQUETBLuVvI24 n1iM/Sq81BmY6uv1cTp1h+HTxqxjcDG5xw62N6fc22ESMxb+G9mmNBHPGrP4DjEL PI6nvq/XoyeA989HGEyCtD9WRp2fbCzEAGLEfrD22G/IcHmmIt9XlFWc8xG2nILc 7I2KNPiL/OKWo82bf9o8P/qYV+UYQ9gDvUzbjnA7YiC4q4mdJoYdoBj/XQ2bi3le IAWbeD/ftmpxsRMtF60EaVanUQzhavhcR5d4HUk5iaNDjt5ec5k= =aeBv -----END PGP SIGNATURE----- --rSlgAddLNYIa/ocX-- --===============1340122981709146819== 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". --===============1340122981709146819==--