Commit 2dd38a1d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: move "missing SIZ" check up

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8ae14bf5
...@@ -1390,14 +1390,14 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) ...@@ -1390,14 +1390,14 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
Jpeg2000Tile *tile; Jpeg2000Tile *tile;
Jpeg2000TilePart *tp; Jpeg2000TilePart *tp;
if (s->curtileno < 0) {
av_log(s->avctx, AV_LOG_ERROR, "Missing SOT\n");
return AVERROR_INVALIDDATA;
}
if (!s->tile) { if (!s->tile) {
av_log(s->avctx, AV_LOG_ERROR, "Missing SIZ\n"); av_log(s->avctx, AV_LOG_ERROR, "Missing SIZ\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if (s->curtileno < 0) {
av_log(s->avctx, AV_LOG_ERROR, "Missing SOT\n");
return AVERROR_INVALIDDATA;
}
tile = s->tile + s->curtileno; tile = s->tile + s->curtileno;
tp = tile->tile_part + tile->tp_idx; tp = tile->tile_part + tile->tp_idx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment