From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B49FB4CFE7 for <ffmpegdev@gitmailbox.com>; Tue, 15 Apr 2025 21:24:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A6A64687CEA; Wed, 16 Apr 2025 00:24:09 +0300 (EEST) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D4F44687A03 for <ffmpeg-devel@ffmpeg.org>; Wed, 16 Apr 2025 00:24:02 +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 53FLO2RW006745 for <ffmpeg-devel@ffmpeg.org>; Tue, 15 Apr 2025 23:24:02 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id 1444B2EFD9; Tue, 15 Apr 2025 23:24:02 +0200 (CEST) Date: Tue, 15 Apr 2025 23:24:02 +0200 From: Nicolas George <george@nsup.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Message-ID: <Z_7Ocpjfh9WfNqbb@phare.normalesup.org> References: <20250415181433.530161-1-michael@niedermayer.cc> <20250415181433.530161-5-michael@niedermayer.cc> <Z_6pR62oq4act_V1@phare.normalesup.org> <20250415190631.GS4991@pb2> <Z_6wIk52_3NeQBlv@phare.normalesup.org> <20250415211134.GV4991@pb2> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250415211134.GV4991@pb2> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 15 Apr 2025 23:24:02 +0200 (CEST) Subject: Re: [FFmpeg-devel] [PATCH v2 5/6] libavutil: Add AVMap X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/Z_7Ocpjfh9WfNqbb@phare.normalesup.org/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> Michael Niedermayer (HE12025-04-15): > or is the goal to avoid the error handling? Both are desirable. I am sure we have in our API a few functions that take a dictionary but are very fast; is it really worth digging around to convince you that avoiding dynamic allocations is worth it? > also in the specific example > av_codec_open3(ctx, codec, NULL); > will no longer work as NULL is a pointer and AVMap here looks like > it would not be My bad, I forgot &, we obviously do not pass large structures by value. > AVMap should be public but the implementation should not be any more > public than needed. > That way users cannot by mistake mess with internals We are FFmpeg, not GNOME, we are not in the business of going out of our way and making our code less efficient for the sole benefit of preventing API users from shooting themselves in the foot. If you insist, there are ways of hiding most of the internals anyway. But I do not think it is worth it. > and we can > improve the internal implementation without ABI/API breakage The trick I introduced in BPrint allows us to improve on internal implementation without ABI/API breakage. I would not insist on it otherwise. Regards, -- Nicolas George _______________________________________________ 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".