Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {