On Sun, 13 Oct 2013 17:27:03 -0400, Justin Ruggles <[email protected]> wrote: > The spec does not specify that 0 is an error condition, and there > are samples which use 0 when the whole image is in one strip. > --- > libavcodec/tiff.c | 11 +++-------- > 1 files changed, 3 insertions(+), 8 deletions(-) > > diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c > index 40001c6..42c4c15 100644 > --- a/libavcodec/tiff.c > +++ b/libavcodec/tiff.c > @@ -418,14 +418,9 @@ static int tiff_decode_tag(TiffContext *s) > } > break; > case TIFF_ROWSPERSTRIP: > - if (type == TIFF_LONG && value == UINT_MAX) > - value = s->avctx->height; > - if (value < 1) { > - av_log(s->avctx, AV_LOG_ERROR, > - "Incorrect value of rows per strip\n"); > - return AVERROR_INVALIDDATA; > - } > - s->rps = value; > + if (!value || type == TIFF_LONG && value == UINT_MAX)
This could use some parens -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
