[FFmpeg-cvslog] avcodec/jpeg2000dec: Fix term_cnt check

Michael Niedermayer git at videolan.org
Tue Jun 16 18:50:11 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun 16 18:31:59 2015 +0200| [36241c4055411355a898920f82ac68e1506c5540] | committer: Michael Niedermayer

avcodec/jpeg2000dec: Fix term_cnt check

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=36241c4055411355a898920f82ac68e1506c5540
---

 libavcodec/jpeg2000dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index d64a7b5..6c86cb3 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;
             }



More information about the ffmpeg-cvslog mailing list