jpeg2000dec: merge sgnd fix from j2k
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 30 May 2013 23:49:31 +0000 (01:49 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 31 May 2013 01:10:07 +0000 (03:10 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index e70b5ce..abd93ef 100644 (file)
@@ -185,7 +185,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);
     }