summaryrefslogtreecommitdiff
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 20cca16ac7..30eee65185 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -187,7 +187,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
switch(depth){
case 24:
for(i = 0; i < avctx->height; i++){
- memcpy(ptr, buf, n);
+ memcpy(ptr, buf, avctx->width*(depth>>3));
buf += n;
ptr += linesize;
}