summaryrefslogtreecommitdiff
path: root/libavcodec/iff.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2010-06-22 12:41:17 +0000
committerPeter Ross <pross@xvid.org>2010-06-22 12:41:17 +0000
commite10412a334092bc2884674799318ff7fc60be785 (patch)
treeea3db1d2f77592fbb1a513eff9444150d8e2468c /libavcodec/iff.c
parente83aed04b0912b37a9805527dbe72e7847d22070 (diff)
IFF PBM decoder: Add a pad byte if image width is odd <aleksi dot nurmi at gmail dot com>
Originally committed as revision 23701 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/iff.c')
-rw-r--r--libavcodec/iff.c2
1 files changed, 1 insertions, 1 deletions
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
}
}