Browse Source

Calculate line size correctly for bit depths < 8

Originally committed as revision 15388 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Kostya Shishkov 17 years ago
parent
commit
a79cae798a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/bmp.c

+ 1
- 1
libavcodec/bmp.c View File

@@ -175,7 +175,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) / 8 + 3) & ~3;

if(n * avctx->height > dsize){
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",


Loading…
Cancel
Save