[FFmpeg-devel] [PATCH]Make cinepak palette opaque

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Mar 5 15:35:17 CET 2013


Hi!

Iirc, the mov specification does define transparency for the 32bit palette, 
but I don't think cinepak encodes transparent frames.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 137f79b..25dcf67 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1373,6 +1373,8 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
                             /* each A, R, G, or B component is 16 bits;
                              * only use the top 8 bits */
                             a = avio_r8(pb);
+                            if (id == AV_CODEC_ID_CINEPAK)
+                                a = 0xFF;
                             avio_r8(pb);
                             r = avio_r8(pb);
                             avio_r8(pb);


More information about the ffmpeg-devel mailing list