summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-20 06:19:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-20 06:19:25 +0200
commitcadbe4ecd19a8bba01f51342dc3d8c157737167e (patch)
tree85dcbec3fadd7e07412990b1b8e18619a90ab072 /libavformat/mov.c
parent7491816010f1028ff94b00e0f3edaeebdf936f4a (diff)
mov: Fix grayscale Cinepak in mov
Fixes Ticket165 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c3
1 files changed, 3 insertions, 0 deletions
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);