[FFmpeg-cvslog] r23701 - trunk/libavcodec/iff.c

pross subversion
Tue Jun 22 14:41:17 CEST 2010


Author: pross
Date: Tue Jun 22 14:41:17 2010
New Revision: 23701

Log:
IFF PBM decoder: Add a pad byte if image width is odd <aleksi dot nurmi at gmail dot com>

Modified:
   trunk/libavcodec/iff.c

Modified: trunk/libavcodec/iff.c
==============================================================================
--- trunk/libavcodec/iff.c	Tue Jun 22 11:22:21 2010	(r23700)
+++ trunk/libavcodec/iff.c	Tue Jun 22 14:41:17 2010	(r23701)
@@ -293,7 +293,7 @@ static int decode_frame_ilbm(AVCodecCont
         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
         }
     }
 



More information about the ffmpeg-cvslog mailing list