lavc/tiff: Don't apply strips-related logic to tiled images

Signed-off-by: Nick Renieris <velocityra@gmail.com>
pull/321/head^2
Nick Renieris 5 years ago committed by Paul B Mahol
parent f98a8666de
commit 33b6752a70
  1. 4
      libavcodec/tiff.c

@ -1790,7 +1790,7 @@ again:
} }
} }
if (!s->strippos && !s->stripoff) { if (!s->is_tiled && !s->strippos && !s->stripoff) {
av_log(avctx, AV_LOG_ERROR, "Image data is missing\n"); av_log(avctx, AV_LOG_ERROR, "Image data is missing\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
@ -1798,6 +1798,7 @@ again:
if ((ret = init_image(s, &frame)) < 0) if ((ret = init_image(s, &frame)) < 0)
return ret; return ret;
if (!s->is_tiled) {
if (s->strips == 1 && !s->stripsize) { if (s->strips == 1 && !s->stripsize) {
av_log(avctx, AV_LOG_WARNING, "Image data size missing\n"); av_log(avctx, AV_LOG_WARNING, "Image data size missing\n");
s->stripsize = avpkt->size - s->stripoff; s->stripsize = avpkt->size - s->stripoff;
@ -1820,6 +1821,7 @@ again:
av_log(avctx, AV_LOG_ERROR, "rps %d invalid\n", s->rps); av_log(avctx, AV_LOG_ERROR, "rps %d invalid\n", s->rps);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
}
/* Handle DNG images with JPEG-compressed tiles */ /* Handle DNG images with JPEG-compressed tiles */

Loading…
Cancel
Save