avutil/bprint: Don't use value of AV_BPRINT_SIZE_AUTOMATIC directly

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-08-06 08:24:23 +02:00
parent 1df13b3891
commit 8a81ecce73

View File

@ -71,7 +71,7 @@ void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
unsigned size_auto = (char *)buf + sizeof(*buf) - unsigned size_auto = (char *)buf + sizeof(*buf) -
buf->reserved_internal_buffer; buf->reserved_internal_buffer;
if (size_max == 1) if (size_max == AV_BPRINT_SIZE_AUTOMATIC)
size_max = size_auto; size_max = size_auto;
buf->str = buf->reserved_internal_buffer; buf->str = buf->reserved_internal_buffer;
buf->len = 0; buf->len = 0;