You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Calculate line size correctly for bit depths < 8
Originally committed as revision 15388 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -175,7 +175,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
|
|||||||
dsize = buf_size - hsize;
|
dsize = buf_size - hsize;
|
||||||
|
|
||||||
/* Line size in file multiple of 4 */
|
/* 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){
|
if(n * avctx->height > dsize){
|
||||||
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",
|
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",
|
||||||
|
Reference in New Issue
Block a user