avcodec/mjpegdec: make type of shift unsigned to avoid undefined behavior

Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-28 00:16:42 +02:00
parent 4260ed462b
commit e31727bd53

View File

@ -1272,7 +1272,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
}
if (!Al) {
s->coefs_finished[c] |= (2LL << se) - (1LL << ss);
s->coefs_finished[c] |= (2ULL << se) - (1ULL << ss);
last_scan = !~s->coefs_finished[c];
}