Le 24/06/2013 17:14, Luca Barbato a écrit :
From: Michael Niedermayer <[email protected]>
Signed-off-by: Luca Barbato <[email protected]>
---
libavcodec/jpeg2kdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/jpeg2kdec.c b/libavcodec/jpeg2kdec.c
index a5aaef5..bd1c61d 100644
--- a/libavcodec/jpeg2kdec.c
+++ b/libavcodec/jpeg2kdec.c
@@ -198,7 +198,7 @@ static int get_siz(Jpeg2KDecoderContext *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);
Funny notation, but correct.I'd have written (x >> 7). LGTM
s->cdx[i] = bytestream2_get_byteu(&s->g);
s->cdy[i] = bytestream2_get_byteu(&s->g);
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel