]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/bmp.c
diracyasm: fix win64
[ffmpeg] / libavcodec / bmp.c
index e97038c5fe194160c5e4ae1329265e9ef6cc7ad5..7e160ae556e1b90a7dd2d8cf38bdb14966b5f184 100644 (file)
@@ -232,9 +232,6 @@ static int bmp_decode_frame(AVCodecContext *avctx,
     if(comp == BMP_RLE4 || comp == BMP_RLE8)
         memset(p->data[0], 0, avctx->height * p->linesize[0]);
 
-    if(depth == 4 || depth == 8)
-        memset(p->data[1], 0, 1024);
-
     if(height > 0){
         ptr = p->data[0] + (avctx->height - 1) * p->linesize[0];
         linesize = -p->linesize[0];
@@ -245,6 +242,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
 
     if(avctx->pix_fmt == PIX_FMT_PAL8){
         int colors = 1 << depth;
+
+        memset(p->data[1], 0, 1024);
+
         if(ihsize >= 36){
             int t;
             buf = buf0 + 46;