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 BB0DC44D93 for ; Tue, 24 Jan 2023 08:00:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B0A2C68BE04; Tue, 24 Jan 2023 10:00:06 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 83D6268BCD7 for ; Tue, 24 Jan 2023 10:00:00 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id CF8692404EC for ; Tue, 24 Jan 2023 08:59:59 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id S9x1U4XRGC1E for ; Tue, 24 Jan 2023 08:59:59 +0100 (CET) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 20D9F240178 for ; Tue, 24 Jan 2023 08:59:59 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id EC7181601B2; Tue, 24 Jan 2023 08:59:58 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <36973e9f-90be-9329-e795-59992aebee2b@passwd.hu> 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> <20230124000144.GB1949656@pb2> <36973e9f-90be-9329-e795-59992aebee2b@passwd.hu> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 24 Jan 2023 08:59:58 +0100 Message-ID: <167454719892.26119.18192077361823416295@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 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: 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: Quoting Marton Balint (2023-01-24 01:06:46) > On Tue, 24 Jan 2023, Michael Niedermayer wrote: > > On Tue, Jan 24, 2023 at 12:22:52AM +0100, Marton Balint wrote: > >> On Mon, 23 Jan 2023, Anton Khirnov wrote: > >>> Quoting Marton Balint (2023-01-23 23:41:11) > >>>> On Mon, 23 Jan 2023, Anton Khirnov wrote: > >>>>> Not breaking callers seems like a very solid benefit to me. > >>>> > >>>> I am not sure if I see your point, during unstable, you can break callers, > >>>> and I planned to do the change during unstable. > >>> > >>> 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. > >> > >> 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. > >> > >> It is not that big of a deal to make a patch if #ifdefs, I just really don't > >> see the benefit. > >> > >> 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_number, > >> 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 > Sure, but do we want AVFrame->coded_picture_number64, > AVFrame->display_picture_number64 Are these even useful for anything? The don't seem like they belong in AVFrame. -- Anton Khirnov _______________________________________________ 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".