diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-03-29 13:20:44 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-03-29 13:20:44 +0400 |
commit | b88a718a117d4d61dad3143ae8b7f46be4c95651 (patch) | |
tree | e38e367c3e2f20d87c9889cf985a2da5cdc2d392 /libavcodec/mjpeg.c | |
parent | 415365d225a20014f517e110cfe8b91f3a3fb76f (diff) |
avoid if(i>=63) check at the end of decode_block()
Originally committed as revision 5239 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r-- | libavcodec/mjpeg.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index f0634a0413..0f2a4e7196 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -1297,14 +1297,17 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block, LAST_SKIP_BITS(re, &s->gb, code) - if (i >= 64) { + if (i >= 63) { + if(i == 63){ + j = s->scantable.permutated[63]; + block[j] = level * quant_matrix[j]; + break; + } dprintf("error count: %d\n", i); return -1; } j = s->scantable.permutated[i]; block[j] = level * quant_matrix[j]; - if (i >= 63) - break; } } CLOSE_READER(re, &s->gb) |