[FFmpeg-cvslog] r15388 - trunk/libavcodec/bmp.c
kostya
subversion
Tue Sep 23 10:32:18 CEST 2008
Author: kostya
Date: Tue Sep 23 10:32:18 2008
New Revision: 15388
Log:
Calculate line size correctly for bit depths < 8
Modified:
trunk/libavcodec/bmp.c
Modified: trunk/libavcodec/bmp.c
==============================================================================
--- trunk/libavcodec/bmp.c (original)
+++ trunk/libavcodec/bmp.c Tue Sep 23 10:32:18 2008
@@ -175,7 +175,7 @@ static int bmp_decode_frame(AVCodecConte
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",
More information about the ffmpeg-cvslog
mailing list