diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c
index 86d1e913a23bec08abbe5e9e5eeacd342caea359..e98d5998ca5f9aaef8cd01abb8169bfffea25088 100644
--- a/libavcodec/bmv.c
+++ b/libavcodec/bmv.c
@@ -219,7 +219,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
             return AVERROR_INVALIDDATA;
         }
         for (i = 0; i < 256; i++)
-            c->pal[i] = bytestream_get_be24(&c->stream);
+            c->pal[i] = 0xFF << 24 | bytestream_get_be24(&c->stream);
     }
     if (type & BMV_SCROLL) {
         if (c->stream - pkt->data > pkt->size - 2) {