]> git.sesse.net Git - ffmpeg/commitdiff
Fix incorrect increment in sgidec.c
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 8 Jan 2012 11:01:59 +0000 (12:01 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 8 Jan 2012 16:26:23 +0000 (17:26 +0100)
Fixes trac issue #899.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavcodec/sgidec.c

index b0a0b20a5e2a88482b85f00f9ffc0f71cecced53..ae05d8359285cce3dfe6033652b885913fbfcd56 100644 (file)
@@ -137,7 +137,8 @@ static int read_uncompressed_sgi(unsigned char* out_buf, uint8_t* out_end,
     for (y = s->height - 1; y >= 0; y--) {
         out_end = out_buf + (y * s->linesize);
         for (x = s->width; x > 0; x--) {
-            ptr = in_buf += s->bytes_per_channel;
+            ptr = in_buf;
+            in_buf += s->bytes_per_channel;
             for(z = 0; z < s->depth; z ++) {
                 memcpy(out_end, ptr, s->bytes_per_channel);
                 out_end += s->bytes_per_channel;