# HG changeset patch # User mru # Date 1162240987 0 # Node ID a90490a13ac4c94f22440e39d4572f745377c139 # Parent 3ae94f9651893b6e63154c8bd50c0780c22b6a74 coded line size is a multiple of 4 diff -r 3ae94f965189 -r a90490a13ac4 bmp.c --- a/bmp.c Mon Oct 30 18:05:35 2006 +0000 +++ b/bmp.c Mon Oct 30 20:43:07 2006 +0000 @@ -177,7 +177,8 @@ buf += hsize; dsize = buf_size - hsize; - n = avctx->width * (depth / 8); + /* Line size in file multiple of 4 */ + n = (avctx->width * (depth / 8) + 3) & ~3; if(n * avctx->height > dsize){ av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",