changeset 9774:69395e6a4d03 libavcodec

Change maskbit variable to contain (1 << maskbit)
author reimar
date Sun, 31 May 2009 10:58:20 +0000
parents 270ae6dc6352
children 3fd46320ab12
files lcldec.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lcldec.c	Sun May 31 10:53:47 2009 +0000
+++ b/lcldec.c	Sun May 31 10:58:20 2009 +0000
@@ -88,10 +88,10 @@
     while (srcptr < srcptr_end && destptr < destptr_end) {
         if (maskbit == 0) {
             mask = *srcptr++;
-            maskbit = 8;
+            maskbit = 0x80;
             continue;
         }
-        if ((mask & (1 << (--maskbit))) == 0) {
+        if (!(mask & maskbit)) {
             memcpy(destptr, srcptr, 4);
             destptr += 4;
             srcptr += 4;
@@ -104,6 +104,7 @@
             av_memcpy_backptr(destptr, ofs, cnt);
             destptr += cnt;
         }
+        maskbit >>= 1;
     }
 
     return destptr - destptr_bak;