avcodec/tiff_common: fix bprint max sizes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-29 21:11:47 +02:00
parent 61274193e3
commit 4be0c6ed20
2 changed files with 6 additions and 6 deletions

View File

@ -90,7 +90,7 @@ int ff_tadd_rational_metadata(int count, const char *name, const char *sep,
return AVERROR_INVALIDDATA;
if (!sep) sep = ", ";
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_AUTOMATIC);
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < count; i++) {
nom = ff_tget_long(gb, le);
@ -124,7 +124,7 @@ int ff_tadd_long_metadata(int count, const char *name, const char *sep,
return AVERROR_INVALIDDATA;
if (!sep) sep = ", ";
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_AUTOMATIC);
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < count; i++) {
av_bprintf(&bp, "%s%i", (i ? sep : ""), ff_tget_long(gb, le));
@ -156,7 +156,7 @@ int ff_tadd_doubles_metadata(int count, const char *name, const char *sep,
return AVERROR_INVALIDDATA;
if (!sep) sep = ", ";
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_AUTOMATIC);
av_bprint_init(&bp, 10 * count, 100 * count);
for (i = 0; i < count; i++) {
av_bprintf(&bp, "%s%f", (i ? sep : ""), ff_tget_double(gb, le));
@ -188,7 +188,7 @@ int ff_tadd_shorts_metadata(int count, const char *name, const char *sep,
return AVERROR_INVALIDDATA;
if (!sep) sep = ", ";
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_AUTOMATIC);
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < count; i++) {
av_bprintf(&bp, "%s%i", (i ? sep : ""), ff_tget_short(gb, le));
@ -220,7 +220,7 @@ int ff_tadd_bytes_metadata(int count, const char *name, const char *sep,
return AVERROR_INVALIDDATA;
if (!sep) sep = ", ";
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_AUTOMATIC);
av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < count; i++) {
av_bprintf(&bp, "%s%i", (i ? sep : ""), bytestream2_get_byte(gb));

File diff suppressed because one or more lines are too long