OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c82ab9
)
Fix linesize for bmp with bitdepth < 8.
author
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Thu, 15 Dec 2011 18:23:07 +0000
(19:23 +0100)
committer
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Thu, 15 Dec 2011 18:23:07 +0000
(19:23 +0100)
Fixes ticket #751.
libavcodec/bmp.c
patch
|
blob
|
history
diff --git
a/libavcodec/bmp.c
b/libavcodec/bmp.c
index
e97f6ed
..
419c3fa
100644
(file)
--- a/
libavcodec/bmp.c
+++ b/
libavcodec/bmp.c
@@
-206,7
+206,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
+ 31) / 8
) & ~3;
if(n * avctx->height > dsize && comp != BMP_RLE4 && comp != BMP_RLE8){
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",