Skip to content
Snippets Groups Projects
Commit a79cae79 authored by Kostya Shishkov's avatar Kostya Shishkov
Browse files

Calculate line size correctly for bit depths < 8

Originally committed as revision 15388 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 26d3e4d3
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment