[FFmpeg-cvslog] jpeg2000: Correctly calculate sgnd
    Michael Niedermayer 
    git at videolan.org
       
    Wed Jul  3 14:49:19 CEST 2013
    
    
  
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul  1 10:01:09 2013 +0200| [ac921338a4986d8cceece8e052dd4af60576d542] | committer: Luca Barbato
jpeg2000: Correctly calculate sgnd
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac921338a4986d8cceece8e052dd4af60576d542
---
 libavcodec/jpeg2000dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index e1da04d..8df6ee2 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -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);
 
    
    
More information about the ffmpeg-cvslog
mailing list