From 8a81ecce73dee9f7919fd88825fed33b0f26775b Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 6 Aug 2023 08:24:23 +0200 Subject: [PATCH] avutil/bprint: Don't use value of AV_BPRINT_SIZE_AUTOMATIC directly Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt --- libavutil/bprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/bprint.c b/libavutil/bprint.c index 5b540ebc9e..23998a8b02 100644 --- a/libavutil/bprint.c +++ b/libavutil/bprint.c @@ -71,7 +71,7 @@ void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max) unsigned size_auto = (char *)buf + sizeof(*buf) - buf->reserved_internal_buffer; - if (size_max == 1) + if (size_max == AV_BPRINT_SIZE_AUTOMATIC) size_max = size_auto; buf->str = buf->reserved_internal_buffer; buf->len = 0;