]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/flicvideo.c
h264: fix cur_chroma_format_idc with slice multithreading.
[ffmpeg] / libavcodec / flicvideo.c
index 2374d54b11ab163d340ba4817c5933b1f87403cb..9111d17d82b85d448adfdd0245d80260b005a650 100644 (file)
@@ -238,7 +238,9 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
                     r = buf[stream_ptr++] << color_shift;
                     g = buf[stream_ptr++] << color_shift;
                     b = buf[stream_ptr++] << color_shift;
-                    entry = (r << 16) | (g << 8) | b;
+                    entry = 0xFF << 24 | r << 16 | g << 8 | b;
+                    if (color_shift == 2)
+                        entry |= entry >> 6 & 0x30303;
                     if (s->palette[palette_ptr] != entry)
                         s->new_palette = 1;
                     s->palette[palette_ptr++] = entry;