]> git.sesse.net Git - ffmpeg/commitdiff
iff: Fix decode_ham_plane32() buf_size.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Feb 2012 21:04:22 +0000 (22:04 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Feb 2012 00:22:38 +0000 (01:22 +0100)
The wrong variable was passed into decode_ham_plane32()
Fixes: Ticket922
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/iff.c

index 24167c722c29eabe0c3cbf13fe6ae37b77239fc9..218594664950b1f06e5bec9621ba932a0037008e 100644 (file)
@@ -544,7 +544,7 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
             uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ];
             memcpy(s->ham_buf, buf, FFMIN(avctx->width, buf_end - buf));
             buf += avctx->width + (avctx->width & 1); // padding if odd
-            decode_ham_plane32((uint32_t *) row, s->ham_buf, s->ham_palbuf, avctx->width);
+            decode_ham_plane32((uint32_t *) row, s->ham_buf, s->ham_palbuf, s->planesize);
         }
     }
 
@@ -631,7 +631,7 @@ static int decode_frame_byterun1(AVCodecContext *avctx,
         for (y = 0; y < avctx->height ; y++) {
             uint8_t *row = &s->frame.data[0][y*s->frame.linesize[0]];
             buf += decode_byterun(s->ham_buf, avctx->width, buf, buf_end);
-            decode_ham_plane32((uint32_t *) row, s->ham_buf, s->ham_palbuf, avctx->width);
+            decode_ham_plane32((uint32_t *) row, s->ham_buf, s->ham_palbuf, s->planesize);
         }
     }