projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26d3e4d
)
Calculate line size correctly for bit depths < 8
author
Kostya Shishkov
<kostya.shishkov@gmail.com>
Tue, 23 Sep 2008 08:32:18 +0000
(08:32 +0000)
committer
Kostya Shishkov
<kostya.shishkov@gmail.com>
Tue, 23 Sep 2008 08:32:18 +0000
(08:32 +0000)
Originally committed as revision 15388 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/bmp.c
patch
|
blob
|
history
diff --git
a/libavcodec/bmp.c
b/libavcodec/bmp.c
index ff34ab75f8d8c6dae2de3b18bd701c9fe2c4a65f..6f815e6c233a2f4c0de1c0adbebaea9e0b435cd4 100644
(file)
--- a/
libavcodec/bmp.c
+++ b/
libavcodec/bmp.c
@@
-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",