Mercurial > libavcodec.hg
comparison bmp.c @ 4109:a90490a13ac4 libavcodec
coded line size is a multiple of 4
author | mru |
---|---|
date | Mon, 30 Oct 2006 20:43:07 +0000 |
parents | c8c591fe26f8 |
children | 5187883df562 |
comparison
equal
deleted
inserted
replaced
4108:3ae94f965189 | 4109:a90490a13ac4 |
---|---|
175 p->key_frame = 1; | 175 p->key_frame = 1; |
176 | 176 |
177 buf += hsize; | 177 buf += hsize; |
178 dsize = buf_size - hsize; | 178 dsize = buf_size - hsize; |
179 | 179 |
180 n = avctx->width * (depth / 8); | 180 /* Line size in file multiple of 4 */ |
181 n = (avctx->width * (depth / 8) + 3) & ~3; | |
181 | 182 |
182 if(n * avctx->height > dsize){ | 183 if(n * avctx->height > dsize){ |
183 av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n", | 184 av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n", |
184 dsize, n * avctx->height); | 185 dsize, n * avctx->height); |
185 return -1; | 186 return -1; |