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 D24C74066E for ; Tue, 24 Jan 2023 00:01:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A950268BDB5; Tue, 24 Jan 2023 02:01:52 +0200 (EET) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3FE0668BD51 for ; Tue, 24 Jan 2023 02:01:46 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 5AB0820005 for ; Tue, 24 Jan 2023 00:01:45 +0000 (UTC) Date: Tue, 24 Jan 2023 01:01:44 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230124000144.GB1949656@pb2> References: <167407008302.4503.12911207010634660934@lain.khirnov.net> <20230120020509.GX1949656@pb2> <167431989409.26119.3043585718968218@lain.khirnov.net> <20230121213629.GZ1949656@pb2> <8b99815-8f2f-8366-68c3-82fe7698c36b@passwd.hu> <167449339006.26119.5457958520936000123@lain.khirnov.net> <167451425590.26119.9270386946186843808@lain.khirnov.net> <42c52732-bdae-2bd8-585-84165a2a39a5@passwd.hu> MIME-Version: 1.0 In-Reply-To: <42c52732-bdae-2bd8-585-84165a2a39a5@passwd.hu> Subject: Re: [FFmpeg-devel] [PATCH 00/26] Major library version bump 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="===============0277112478624790651==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0277112478624790651== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eZmbrWU10I35niuH" Content-Disposition: inline --eZmbrWU10I35niuH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 24, 2023 at 12:22:52AM +0100, Marton Balint wrote: >=20 >=20 > On Mon, 23 Jan 2023, Anton Khirnov wrote: >=20 > > Quoting Marton Balint (2023-01-23 23:41:11) > > > On Mon, 23 Jan 2023, Anton Khirnov wrote: > > > > Quoting Marton Balint (2023-01-21 23:00:52) > > > > > AVCodecContext->frame_number should be changed to int64_t. I gues= s you > > > > > could do something similar which was done for buffer_size_t, but = that > > > > > seems like a lot of extra work and ifdefry for questionable benef= it. > > > >=20 > > > > Not breaking callers seems like a very solid benefit to me. > > >=20 > > > I am not sure if I see your point, during unstable, you can break cal= lers, > > > and I planned to do the change during unstable. > >=20 > > My understanding of this instability period is that it's mainly for ABI > > changes like reordering struct fields and such, you're still not allowed > > to arbitrarily break random APIs. The entire point of having deprecation > > periods is that callers can prepare in advance and never actually be > > broken. >=20 > If some fields or API is deprecated, then yes, it makes sense. But if no > deprecation / replacement API is provided, then how will anybody prepare? > For type changes, fields are usually not deprecated. Ifdefs are only used= to > prepare the changes for the next API bump. For example, buffer_size_t was= in > the codebase for 2 months only. >=20 > It is not that big of a deal to make a patch if #ifdefs, I just really do= n't > see the benefit. >=20 > An actual problem however, is that printf() like functions expect type > specifiers, and unlike buffer sizes, there is a good chance the users > sometimes print AVCodecContext->frame_number or AVFrame->xxx_picture_numb= er, > which will become undefined behaviour. And yes, the compiler will usually > warn, but still, type changes can cause silent breakage. But using #define > API guards will not fix this, whenever you change the type, code will get > broken, I am not sure if anything can be done about it. if you want to avoid this then, new type, new identifer [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus --eZmbrWU10I35niuH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY88f3gAKCRBhHseHBAsP q28NAJ9cNqKIvBZDk0FeYu3+fkeOknWdtACfVhsrp26x2do8D2Qt1AvGkVn9mAs= =+Lbo -----END PGP SIGNATURE----- --eZmbrWU10I35niuH-- --===============0277112478624790651== 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". --===============0277112478624790651==--