[FFmpeg-devel] [PATCH 1/7] avutil/bprint: Don't use value of AV_BPRINT_SIZE_AUTOMATIC directly

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Aug 6 13:10:40 EEST 2023


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 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;
-- 
2.34.1



More information about the ffmpeg-devel mailing list