From cadbe4ecd19a8bba01f51342dc3d8c157737167e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 20 Sep 2011 06:19:25 +0200 Subject: [PATCH] mov: Fix grayscale Cinepak in mov Fixes Ticket165 Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 5464b783d3..70cd776496 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1052,6 +1052,9 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) color_index = 255; color_dec = 256 / (color_count - 1); for (j = 0; j < color_count; j++) { + if (id == CODEC_ID_CINEPAK){ + r = g = b = color_count - 1 - color_index; + }else r = g = b = color_index; sc->palette[j] = (r << 16) | (g << 8) | (b);