diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index d00ef107d1..5ec929d7b4 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1125,7 +1125,7 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile continue; } - if (reslevelno < codsty->nreslevels) { + { Jpeg2000ResLevel *rlevel = tile->comp[compno].reslevel + reslevelno; ok_reslevel = 1;