[FFmpeg-devel] Ticket 165, grayscale Cinepak in mov

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Aug 29 23:22:42 CEST 2011


Hi!

I had attached this patch to ticket 165, it seems to fix all samples.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 773760c..a75217d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1046,7 +1046,8 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
                 if (color_greyscale) {
                     int color_index, color_dec;
                     /* compute the greyscale palette */
-                    st->codec->bits_per_coded_sample = color_depth;
+                    if (id != CODEC_ID_CINEPAK)
+                        st->codec->bits_per_coded_sample = color_depth;
                     color_count = 1 << color_depth;
                     color_index = 255;
                     color_dec = 256 / (color_count - 1);


More information about the ffmpeg-devel mailing list