Mercurial > libavcodec.hg
changeset 3228:ad50f9ef5c6b libavcodec
avoid if(i>=63) check at the end of decode_block()
author | michael |
---|---|
date | Wed, 29 Mar 2006 09:20:44 +0000 |
parents | ea0ca798d389 |
children | 0afff8f416e6 |
files | mjpeg.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mjpeg.c Wed Mar 29 09:13:43 2006 +0000 +++ b/mjpeg.c Wed Mar 29 09:20:44 2006 +0000 @@ -1297,14 +1297,17 @@ 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)