summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-13 03:29:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-13 03:30:02 +0200
commit75b4e4013796b26c8cc22fd9f9bec0cc8672c767 (patch)
treef907c6f0814a502e3c1d62611585fa8f0e0d4621 /libavcodec/tiff.c
parent94cf83ff91b2380e487211a0444bcd4ac9b58b75 (diff)
parentfdbe18b7b0545f9b5923d25a5433e4f735719ecc (diff)
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>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 69d1bb2381..0868a016e3 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -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) {