jpeg2000: Correctly calculate sgnd
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 1 Jul 2013 08:01:09 +0000 (10:01 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 2 Jul 2013 18:05:44 +0000 (20:05 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/jpeg2000dec.c

index e1da04d0c62412c481e2ab04977acbff676bb0eb..8df6ee2df4a3458d69e800be32fb6de59443d20a 100644 (file)
@@ -198,7 +198,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
         uint8_t x    = bytestream2_get_byteu(&s->g);
         s->cbps[i]   = (x & 0x7f) + 1;
         s->precision = FFMAX(s->cbps[i], s->precision);
-        s->sgnd[i]   = (x & 0x80) == 1;
+        s->sgnd[i]   = !!(x & 0x80);
         s->cdx[i]    = bytestream2_get_byteu(&s->g);
         s->cdy[i]    = bytestream2_get_byteu(&s->g);