diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c
index e05a7a9b0a897d088f878f7283ff2df7c6e40f34..8a8d6a9cef31d64286bb1143a71351a4a5709a21 100644
--- a/libavcodec/eacmv.c
+++ b/libavcodec/eacmv.c
@@ -141,7 +141,7 @@ static void cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t
 
     buf += 16;
     for (i=pal_start; i<pal_start+pal_count && i<AVPALETTE_COUNT && buf_end - buf >= 3; i++) {
-        s->palette[i] = AV_RB24(buf);
+        s->palette[i] = 0xFF << 24 | AV_RB24(buf);
         buf += 3;
     }
 }