[FFmpeg-cvslog] avcodec/jpeg2000dec: fix boolean operator

Michael Niedermayer git at videolan.org
Tue Jun 2 00:50:11 CEST 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Wed May 13 15:15:55 2015 +0200| [5766f99f71c972a0d2f36103eeb2795822819068] | committer: Michael Niedermayer

avcodec/jpeg2000dec: fix boolean operator

Fixes CID1271791 #7-6

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit f8f155a18ac454e7ff3312e0e0c3a70eb4359143)

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

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

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

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index d6204bb..eb299c5 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1606,7 +1606,7 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
                         int cn   = bytestream2_get_be16(&s->g);
                         int av_unused typ  = bytestream2_get_be16(&s->g);
                         int asoc = bytestream2_get_be16(&s->g);
-                        if (cn < 4 || asoc < 4)
+                        if (cn < 4 && asoc < 4)
                             s->cdef[cn] = asoc;
                     }
                 }



More information about the ffmpeg-cvslog mailing list