Commit 75b4e401 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'fdbe18b7'

* commit 'fdbe18b7':
  tiffdec: use a single strip if RowsPerStrip is 0

Conflicts:
	libavcodec/tiff.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 94cf83ff fdbe18b7
......@@ -704,14 +704,9 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
}
break;
case TIFF_ROWSPERSTRIP:
if (type == TIFF_LONG && value == UINT_MAX)
if (!value || (type == TIFF_LONG && value == UINT_MAX))
value = s->height;
if (value < 1) {
av_log(s->avctx, AV_LOG_ERROR,
"Incorrect value of rows per strip\n");
return AVERROR_INVALIDDATA;
}
s->rps = value;
s->rps = FFMIN(value, s->height);
break;
case TIFF_STRIP_OFFS:
if (count == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment