1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +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",