Change maskbit variable to contain (1 << maskbit)

Originally committed as revision 19058 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Reimar Döffinger 2009-05-31 10:58:20 +00:00
parent e0b3af9059
commit a5d2745d8e
1 changed files with 3 additions and 2 deletions

View File

@ -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;