changeset 4109:a90490a13ac4 libavcodec

coded line size is a multiple of 4
author mru
date Mon, 30 Oct 2006 20:43:07 +0000
parents 3ae94f965189
children e7e72aad32e4
files bmp.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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",