Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-15 22:23:07 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-15 22:23:07 +0400
commit6f2054c589a467b7eaa0c4383c29fcced1280265 (patch)
treef911da14fbbea0e8ad4618a2ad7065ccefe519f0 /libavcodec/bmp.c
parent2c82ab946b8722a3501069e346809288db69e858 (diff)
Fix linesize for bmp with bitdepth < 8.
Fixes ticket #751.
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index e97f6ed67c..419c3fa197 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -206,7 +206,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
dsize = buf_size - hsize;
/* Line size in file multiple of 4 */
- n = ((avctx->width * depth) / 8 + 3) & ~3;
+ n = ((avctx->width * depth + 31) / 8) & ~3;
if(n * avctx->height > dsize && comp != BMP_RLE4 && comp != BMP_RLE8){
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",