summaryrefslogtreecommitdiff
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-03-29 09:20:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-03-29 09:20:44 +0000
commitb88a718a117d4d61dad3143ae8b7f46be4c95651 (patch)
treee38e367c3e2f20d87c9889cf985a2da5cdc2d392 /libavcodec/mjpeg.c
parent415365d225a20014f517e110cfe8b91f3a3fb76f (diff)
downloadffmpeg-b88a718a117d4d61dad3143ae8b7f46be4c95651.tar.gz
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.c9
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)