Browse Source

coded line size is a multiple of 4

Originally committed as revision 6844 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Måns Rullgård 19 years ago
parent
commit
743311a1b0
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/bmp.c

+ 2
- 1
libavcodec/bmp.c View File

@@ -177,7 +177,8 @@ static int bmp_decode_frame(AVCodecContext *avctx,
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",


Loading…
Cancel
Save