summaryrefslogtreecommitdiff
path: root/libavcodec/jpeg2000dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-16 18:31:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-16 18:31:59 +0200
commit36241c4055411355a898920f82ac68e1506c5540 (patch)
tree78b1f1a604e64ed1e82c1a2b0ebf56978b26e258 /libavcodec/jpeg2000dec.c
parent918abc19ff7402354db7bfdb11252577e90ec05c (diff)
avcodec/jpeg2000dec: Fix term_cnt check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpeg2000dec.c')
-rw-r--r--libavcodec/jpeg2000dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index d64a7b5f0b..6c86cb3d80 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1389,7 +1389,7 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
ff_mqc_init_contexts(&t1->mqc);
if (passno && (coder_type = needs_termination(codsty->cblk_style, pass_cnt))) {
- if (term_cnt > cblk->nb_terminations) {
+ if (term_cnt >= cblk->nb_terminations) {
av_log(s->avctx, AV_LOG_ERROR, "Missing needed termination \n");
return AVERROR_INVALIDDATA;
}