Mercurial > libavcodec.hg
changeset 9322:cea979496c7a libavcodec
Fix ipvideo_decode_block_opcode_0xD again.
author | reimar |
---|---|
date | Tue, 31 Mar 2009 22:28:36 +0000 |
parents | fdd902365b49 |
children | f347365f2da4 |
files | interplayvideo.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/interplayvideo.c Tue Mar 31 20:13:29 2009 +0000 +++ b/interplayvideo.c Tue Mar 31 22:28:36 2009 +0000 @@ -493,18 +493,19 @@ static int ipvideo_decode_block_opcode_0xD(IpvideoContext *s) { int y; - unsigned char P; + unsigned char P[2]; /* 4-color block encoding: each 4x4 block is a different color */ CHECK_STREAM_PTR(4); - for (y = 0; y < 16; y++) { - if (!(y & 3)) // start of block - P = *s->stream_ptr++; - memset(s->pixel_ptr, P, 4); + for (y = 0; y < 8; y++) { + if (!(y & 3)) { + P[0] = *s->stream_ptr++; + P[1] = *s->stream_ptr++; + } + memset(s->pixel_ptr, P[0], 4); + memset(s->pixel_ptr + 4, P[1], 4); s->pixel_ptr += s->stride; - // switch to right half - if (y == 7) s->pixel_ptr -= 8 * s->stride - 4; } /* report success */