[FFmpeg-devel] [PATCH]Make the mov palette opaque

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Dec 24 02:37:20 CET 2011


Hi!

Attached patch makes the palette in mov files opaque.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mov.c b/libavformat/mov.c
index dd8e92e..8566605 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1228,7 +1228,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
                         }else
                         r = g = b = color_index;
                         sc->palette[j] =
-                            (r << 16) | (g << 8) | (b);
+                            (0xFF << 24) | (r << 16) | (g << 8) | (b);
                         color_index -= color_dec;
                         if (color_index < 0)
                             color_index = 0;


More information about the ffmpeg-devel mailing list