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 6D08444D6B for ; Tue, 24 Jan 2023 00:07:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3307768BDD4; Tue, 24 Jan 2023 02:06:59 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3BEFD68BDBE for ; Tue, 24 Jan 2023 02:06:53 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id C0851E8630 for ; Tue, 24 Jan 2023 01:06:51 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9H-QKUmQsh4P for ; Tue, 24 Jan 2023 01:06:46 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id A3857E8353 for ; Tue, 24 Jan 2023 01:06:46 +0100 (CET) Date: Tue, 24 Jan 2023 01:06:46 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20230124000144.GB1949656@pb2> Message-ID: <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> 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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: >>>>> Quoting Marton Balint (2023-01-21 23:00:52) >>>>>> AVCodecContext->frame_number should be changed to int64_t. I guess 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 benefit. >>>>> >>>>> 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 and AVCodecContext->frame_number64? Regards, Marton _______________________________________________ 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".