Merge commit 'fdbe18b7b0545f9b5923d25a5433e4f735719ecc'

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

Conflicts:
	libavcodec/tiff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-13 03:29:23 +02:00
commit 75b4e40137
1 changed files with 2 additions and 7 deletions

View File

@ -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) {