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 7087F4BD2D for ; Tue, 26 Aug 2025 19:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1756235967; h=date : to : in-reply-to : message-id : references : mime-version : 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=7uG9qWhxnRPh74jr8s4kED0ExrbQgRZSsCfnzUOJ3js=; b=FYvsqITZk1nUXAD5M/50kUx1lthsDMrbRtXFamHoNE6OGaMdw0uNy9nYGQc1rl89E55Hp rnHIxWnfnO5Tx3mb6aB49k1cGIZH0Ify4apUaPfxE4wt9ZbXXffiwBjuS6k2IW2ajOY1NVt c+yQWN+YKXjrf+6qH2GCTWkgbA4b75eJGOrhAIcwC3D2817WaYoPn8lBVXdV5jXgFJh+tWN AJCY4IxnwuaophHPJGcc953GTn2sr9rGk1+SGdYwTgaF84obhTt3ar0zSKTfqNAIOrIipuc YktmLYfLN8LzSyVV7Qu+3R0v/Fsx/0ZfaGPPZrMrBGCu8bnMeDMu4+6TuL4Q== Received: from [172.18.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 8605168E79F; Tue, 26 Aug 2025 22:19:27 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1756235953; b=gnBK0TUpnSDLF06XtzrxK2d8vkPs3QzuGpfQTPZRmcV8z2IwN929n6YgqRvp5sl7DnMw7 H0JsD/f7EVFR8HvAsRC62Dv10cZ10ynRDoqOi0qES1jmssuvzp89H3pjeX81KQsQWNN2Zib 5YJgxj6S+YQNoo+6r0E6/ysHHnK6KyuZGwxxocXrYMfHbFfeo1JEMa5CgxyVZzTIA1Kzpmg EHMUQxOpldZF3+9lYRephQAFaNMfqNrTtqtCI6WEK9tfd24buGdfZ9lYma2TeFfQMaMaO53 8BRZvwwUBGThyN2fwO0AqBxeiAi5PsaTsLp7PCqT9FALtVQHt3fyn/32PP2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1756235953; 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=SBo8rMNkgK6zPCtgGctIDiDONpok2Qc42bhZBNKAiOQ=; b=hr5ZPYt1Fb6/8SaVeBNDEwghGWSYYJrwdLsjf65BjBROhesnxK4D+QezRB5xsodzOOmg7 9rPjDzRSC3q5i3qjn40uuHsNgLx7D3VOqBo52lu6p+mf77Tgw6lB+ubtjPTMhDRGEOdc3NQ Ui6Ie31S1NOZZF5ldDUJ6Y8PlsSCqW/4tWd6f54ycDRsGRy4YBv0AmBfMc2i1hruhDnP1OR VwWUmyOhJ7Bcb4JoJGiVZRA2Dgage2bs4nssdbyYTCMMKOool0qmL0S8wgbZjGfNZ8yd4H/ F8azdrlKLlM5Ez7Fg5LV6qb8D/cl235hfgJSaBK4HIb60lJKF8FDZbZwhoYw== 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 iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 3852868D765 for ; Tue, 26 Aug 2025 22:18:59 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id C8AFFEBAC5 for ; Tue, 26 Aug 2025 21:17:01 +0200 (CEST) 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 dv18zEzv1PLg for ; Tue, 26 Aug 2025 21:17:00 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 352DFEBAC2 for ; Tue, 26 Aug 2025 21:17:00 +0200 (CEST) Date: Tue, 26 Aug 2025 21:17:00 +0200 (CEST) To: Nicolas George via ffmpeg-devel In-Reply-To: Message-ID: References: <20250824203654.4450A68E704@ffbox0-bg.ffmpeg.org> MIME-Version: 1.0 Message-ID-Hash: KFBS3GMSMIKM3OKT4XSU6BQZMEHTM2MR X-Message-ID-Hash: KFBS3GMSMIKM3OKT4XSU6BQZMEHTM2MR X-MailFrom: SRS0=/Jox=3G=passwd.hu=cus@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: Marton Balint via ffmpeg-devel Cc: Marton Balint Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: On Tue, 26 Aug 2025, Nicolas George via ffmpeg-devel wrote: > 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? This change is diff-algorithm dependant, but I have already force pushed a new version which gets rid of this. > >> >> 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, Thanks, Marton _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org