avidec: Set palette alpha as fully opaque
authorVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 2 Oct 2016 16:24:07 +0000 (12:24 -0400)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 2 Oct 2016 19:42:03 +0000 (15:42 -0400)
Palette format is always in RGBA.

libavformat/avidec.c

index b2457d5..b07dabd 100644 (file)
@@ -653,7 +653,7 @@ static int avi_read_header(AVFormatContext *s)
                         pal_src  = st->codecpar->extradata +
                                    st->codecpar->extradata_size - pal_size;
                         for (i = 0; i < pal_size / 4; i++)
-                            ast->pal[i] = AV_RL32(pal_src + 4 * i);
+                            ast->pal[i] = (0xFFu << 24) | AV_RL32(pal_src + 4 * i);
                         ast->has_pal = 1;
                     }