From e10412a334092bc2884674799318ff7fc60be785 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Tue, 22 Jun 2010 12:41:17 +0000 Subject: IFF PBM decoder: Add a pad byte if image width is odd Originally committed as revision 23701 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/iff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/iff.c') diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 29353bf1f4..21d93ec102 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -293,7 +293,7 @@ static int decode_frame_ilbm(AVCodecContext *avctx, for(y = 0; y < avctx->height; y++ ) { uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]]; memcpy(row, buf, FFMIN(avctx->width, buf_end - buf)); - buf += avctx->width; + buf += avctx->width + (avctx->width % 2); // padding if odd } } -- cgit v1.2.3