From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 77FFC4BD15 for ; Tue, 26 Aug 2025 18:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1756231581; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=eVwuOEewPTqFjSIEAX9i1y2tNLaphbdqGHyLPQsNGAk=; b=yjGbHS4w1WKZqHIQYpyoYtCB5E85+STAKTs26ZShKtxm33ZSyipRyWMjHxzcGlE8x7P5I pdkCTke3+plQmL3TYJ70pcljHPlermiFuh5y+hG+G3fiF3kK2nJPkAtVsqxMIgKuRN6M8vJ VDhb9hMtMruHYbGVZ0uh+Pql6wuxLpDbDy1yvGyLTfISKrGnF8UNLZFCrfC+5+kc42FOHsN 4N25yfSzYvtIaFioG++5XLc88F8kj7xeky9ovPH9r79qaWgzNJVleYIPSFtomsIDcvq+Yix 1eej0d+MbSuGAmgWHgq849jZKCtnufL0lt2NOxjRrRIxIqK/EwHF++uaOyWQ== Received: from [172.18.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id BD6A968E7D2; Tue, 26 Aug 2025 21:06:21 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1756231566; b=eT50lQo8NUX6drXw/cYB8N2Yo4yfNIUSuSYqvyUCuaAnibJ71rpPXY8+L91qisY3JVUqh sZ1lj6nmwBa5w2cBoBKGNBgTseHvg1Swwj95xWQtGKqK6pgaBCU14/GU7cg8l4ALY0ETf7E SV/OMLMwVzjedY5K/IQbHQclDZG7iPfkDHad6Vn3HYDK9O7o1c76NIZotTSgHJdPj4ZFqPK 6gbFEbs6hu2yXATAGpZvOgB/+RtLG2zw0/5Tj3FXydJcLSLVd/+ihN3FU1VKXfQD8CQekMu 9DaaUnr7HnyHHDV+eXkWIG1a95LOfv6g+TcFlmm91eGhWXTmVVpZuHbp9tPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1756231566; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=8chHR9eUQwUeVRhh5ZTBAJ1fuLKTfKa+9rWL0Ln5i1k=; b=oP155vm3bu3YDcjhNNJy2m3efBGLkWhXGAgfWIYemUqSYidzOgObgSgkbLpTKRiY4WWE6 Ht+LdxiT38w4kyXnkXj8gfz+HSS/u8ji/8clMPWK1bH80ZT0vKJQLhDBpPyfP+f+aS4+Jr7 uhj5RqhvKVl/Mimq49/GrJaPfLztYCTsAZZUzeLo+0lFEjnBkLzCPaQgC9NqoPd+bBi+zCw 2DkZja/8o02DigqlfAlxEOmhT+x2Jsn9q1MTW8BdQLrVgbTdhIixCxLPUOIsJckNwTc6+W/ wkk/BE0SOAjktRxnCSxBCwwb90MdWhowh2jKrDP5rIuTJ9JvxaxSLeiNL/ZQ== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=fail; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=fail; arc=none (Message is not ARC signed); dmarc=none Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 6C78868D8D5; Tue, 26 Aug 2025 21:05:47 +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 57QI5k2Z011431 ; Tue, 26 Aug 2025 20:05:46 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id 577A82EFE5; Tue, 26 Aug 2025 20:05:46 +0200 (CEST) Date: Tue, 26 Aug 2025 20:05:46 +0200 To: FFmpeg development discussions and patches Message-ID: References: <20250824203654.4450A68E704@ffbox0-bg.ffmpeg.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250824203654.4450A68E704@ffbox0-bg.ffmpeg.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 26 Aug 2025 20:05:46 +0200 (CEST) Message-ID-Hash: 742BP5MKJ6GSQC7JLVGAZIZLQJS4VFMR X-Message-ID-Hash: 742BP5MKJ6GSQC7JLVGAZIZLQJS4VFMR X-MailFrom: SRS0=3ArC=3G=phare.normalesup.org=george@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PATCH] avutil/bprint: fix av_bprint_strftime with %p format string reporting truncated output (PR #20330) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Nicolas George via ffmpeg-devel Cc: Marton Balint , Nicolas George Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: Marton Balint via ffmpeg-devel (HE12025-08-24): > >From f8e83bce6269c95fbad90f34434ceb641bf753d5 Mon Sep 17 00:00:00 2001 > From: Marton Balint > Date: Sun, 24 Aug 2025 21:42:54 +0200 > Subject: [PATCH 1/2] avutil/bprint: make av_bprintf use av_vbprintf > > No reason to duplicate the code. > > Signed-off-by: Marton Balint No objection. > --- > libavutil/bprint.c | 33 +++++++++------------------------ > 1 file changed, 9 insertions(+), 24 deletions(-) > > diff --git a/libavutil/bprint.c b/libavutil/bprint.c > index 4e9571715c..932c03ce50 100644 > --- a/libavutil/bprint.c > +++ b/libavutil/bprint.c > @@ -96,35 +96,12 @@ void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size) > *buf->str = 0; > } > > -void av_bprintf(AVBPrint *buf, const char *fmt, ...) > -{ > - unsigned room; > - char *dst; > - va_list vl; > - int extra_len; > - > - while (1) { > - room = av_bprint_room(buf); > - dst = room ? buf->str + buf->len : NULL; > - va_start(vl, fmt); > - extra_len = vsnprintf(dst, room, fmt, vl); > - va_end(vl); > - if (extra_len <= 0) > - return; > - if (extra_len < room) > - break; > - if (av_bprint_alloc(buf, extra_len)) > - break; > - } > - av_bprint_grow(buf, extra_len); > -} > - > void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg) > { > unsigned room; > char *dst; > - int extra_len; > va_list vl; > + int extra_len; Uh? > > while (1) { > room = av_bprint_room(buf); > @@ -142,6 +119,14 @@ void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg) > av_bprint_grow(buf, extra_len); > } > > +void av_bprintf(AVBPrint *buf, const char *fmt, ...) > +{ > + va_list vl; > + va_start(vl, fmt); > + av_vbprintf(buf, fmt, vl); > + va_end(vl); > +} > + > void av_bprint_chars(AVBPrint *buf, char c, unsigned n) > { > unsigned room, real_n; Regards, -- Nicolas George _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org