summaryrefslogtreecommitdiff
path: root/libavcodec/lcldec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-31 10:58:20 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-31 10:58:20 +0000
commita5d2745d8efa9e2f4a5269e665add85a2e9be4f7 (patch)
tree2a185ceabbbe512fc4374762d09858569e11f999 /libavcodec/lcldec.c
parente0b3af90599b2d9d593e935db67290361a853a47 (diff)
Change maskbit variable to contain (1 << maskbit)
Originally committed as revision 19058 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r--libavcodec/lcldec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 702e572558..9589b93b8d 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -88,10 +88,10 @@ static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsign
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 @@ static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsign
av_memcpy_backptr(destptr, ofs, cnt);
destptr += cnt;
}
+ maskbit >>= 1;
}
return destptr - destptr_bak;