diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-31 22:28:36 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-31 22:28:36 +0000 |
commit | 8514f8427f7923b1a0ff372f1f4eca082542f782 (patch) | |
tree | 4136bbd626b46068cc11b614a726537ea4acc092 /libavcodec/interplayvideo.c | |
parent | 9b34899ecf56e695de08852874d452b147523fb8 (diff) | |
download | ffmpeg-8514f8427f7923b1a0ff372f1f4eca082542f782.tar.gz |
Fix ipvideo_decode_block_opcode_0xD again.
Originally committed as revision 18289 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r-- | libavcodec/interplayvideo.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index cdbea2edd1..50db2e95da 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -493,18 +493,19 @@ static int ipvideo_decode_block_opcode_0xC(IpvideoContext *s) 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 */ |