1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-29 20:56:12 +02:00

coded line size is a multiple of 4

Originally committed as revision 6844 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2006-10-30 20:43:07 +00:00
parent 2959ba80c2
commit 743311a1b0

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",