summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-06-10 16:00:02 +0800
committerJun Zhao <jun.zhao@intel.com>2018-06-17 09:59:33 +0800
commite4d14b046ea3c29394ae6e34919e6c67cf57643a (patch)
tree0bd4723f1636f96b985ac35ef424cd807b1d73a2 /libavcodec/pngdec.c
parentd0a2ad241c914bd69bf33490a7310f0a917c9053 (diff)
lavc/pngdec: Replace the number by macro for bprint init
Replace the number by macro for bprint init. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index f93f200bb1..01144680f2 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -446,7 +446,7 @@ static int decode_zbuf(AVBPrint *bp, const uint8_t *data,
return AVERROR_EXTERNAL;
zstream.next_in = (unsigned char *)data;
zstream.avail_in = data_end - data;
- av_bprint_init(bp, 0, -1);
+ av_bprint_init(bp, 0, AV_BPRINT_SIZE_UNLIMITED);
while (zstream.avail_in > 0) {
av_bprint_get_buffer(bp, 2, &buf, &buf_size);
@@ -1315,7 +1315,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
char *gamma_str;
int num = bytestream2_get_be32(&s->gb);
- av_bprint_init(&bp, 0, -1);
+ av_bprint_init(&bp, 0, AV_BPRINT_SIZE_UNLIMITED);
av_bprintf(&bp, "%i/%i", num, 100000);
ret = av_bprint_finalize(&bp, &gamma_str);
if (ret < 0)