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 3AD8D4533E for ; Tue, 24 Jan 2023 19:49:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9FE6068BE34; Tue, 24 Jan 2023 21:49:01 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0327F68BD65 for ; Tue, 24 Jan 2023 21:48:55 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 4CCC5E7999 for ; Tue, 24 Jan 2023 20:48:53 +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 omS1TLwT9_TG for ; Tue, 24 Jan 2023 20:48:52 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id CF178E7982 for ; Tue, 24 Jan 2023 20:48:51 +0100 (CET) Date: Tue, 24 Jan 2023 20:48:51 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <167454719892.26119.18192077361823416295@lain.khirnov.net> Message-ID: 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> <167454719892.26119.18192077361823416295@lain.khirnov.net> 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, Anton Khirnov wrote: > 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. It might have some users as some decoders (Dirac or AVS3-P2) set it based on bitstream values. Plus mpegvideoenc is also using it for something... 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".