]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/jvdec.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / jvdec.c
index f1fdee5d43026b775458369d99e65f8944a119f5..223cef1fa7ea61875cdcfb09b34bdaffcfe3ef04 100644 (file)
@@ -172,7 +172,8 @@ static int decode_frame(AVCodecContext *avctx,
 
     if (buf < buf_end) {
         for (i = 0; i < AVPALETTE_COUNT && buf + 3 <= buf_end; i++) {
-            s->palette[i] = AV_RB24(buf) << 2;
+            uint32_t pal = AV_RB24(buf);
+            s->palette[i] = 0xFF << 24 | pal << 2 | ((pal >> 4) & 0x30303);
             buf += 3;
         }
         s->palette_has_changed = 1;