Move if() in mjpeg decode_block() to simplify condition.
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Oct 2010 22:44:28 +0000 (22:44 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Oct 2010 22:44:28 +0000 (22:44 +0000)
Originally committed as revision 25541 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mjpegdec.c

index 4dcbfdb..fe08d7b 100644 (file)
@@ -412,8 +412,8 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
         if (code == 0x10)
             break;
         i += ((unsigned)code) >> 4;
-        if(code != 0x100){
             code &= 0xf;
+        if(code){
             if(code > MIN_CACHE_BITS - 16){
                 UPDATE_CACHE(re, &s->gb)
             }