mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-21 14:26:59 +00:00
Fix linesize for bmp with bitdepth < 8.
Fixes ticket #751.
(cherry picked from commit 6f2054c589
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
54aa78adaa
commit
56e2190e10
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user