[SCM] libav/experimental: IFF PBM decoder: Add a pad byte if image width is odd <aleksi dot nurmi at gmail dot com>

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:08:58 UTC 2013


The following commit has been merged in the experimental branch:
commit e10412a334092bc2884674799318ff7fc60be785
Author: Peter Ross <pross at xvid.org>
Date:   Tue Jun 22 12:41:17 2010 +0000

    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

diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 29353bf..21d93ec 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
         }
     }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list