diff options
author | Måns Rullgård <mans@mansr.com> | 2010-05-09 20:24:20 +0400 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-05-09 20:24:20 +0400 |
commit | 79a9672d45899fa7afa335b5ffa6a7d0781fbc7c (patch) | |
tree | 8d6bfd98023b31d460a69e5d14a222b59b83b369 /libavcodec/iff.c | |
parent | e24db3e3918e7eb0d2f217a81d4b902c6945c958 (diff) |
IFF: decode last 8 pixels per line
The decodeplane8() function processes one byte of input less than
it should. Also, the for loop has an unusual style with side-effects
in the controlling expression; replaced with a more intuitive while
loop.
10l to Basty.
Originally committed as revision 23063 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/iff.c')
-rw-r--r-- | libavcodec/iff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c index e563de1887..d23837e13c 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -141,9 +141,10 @@ static av_cold int decode_init(AVCodecContext *avctx) static void decodeplane8(uint8_t *dst, const uint8_t *buf, int buf_size, int bps, int plane) { const uint64_t *lut = plane8_lut[plane]; - for(; --buf_size != 0; dst += 8) { + while (buf_size--) { uint64_t v = AV_RN64A(dst) | lut[*buf++]; AV_WN64A(dst, v); + dst += 8; } } |