mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
tiffdec: use a single strip if RowsPerStrip is 0
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.
This commit is contained in:
parent
0a467a9b59
commit
fdbe18b7b0
@ -418,14 +418,9 @@ static int tiff_decode_tag(TiffContext *s)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TIFF_ROWSPERSTRIP:
|
case TIFF_ROWSPERSTRIP:
|
||||||
if (type == TIFF_LONG && value == UINT_MAX)
|
if (!value || (type == TIFF_LONG && value == UINT_MAX))
|
||||||
value = s->avctx->height;
|
value = s->height;
|
||||||
if (value < 1) {
|
s->rps = FFMIN(value, s->height);
|
||||||
av_log(s->avctx, AV_LOG_ERROR,
|
|
||||||
"Incorrect value of rows per strip\n");
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
s->rps = value;
|
|
||||||
break;
|
break;
|
||||||
case TIFF_STRIP_OFFS:
|
case TIFF_STRIP_OFFS:
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user