[FFmpeg-cvslog] mov: Fix grayscale Cinepak in mov
Michael Niedermayer
git at videolan.org
Tue Sep 20 14:19:15 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 20 06:19:25 2011 +0200| [cadbe4ecd19a8bba01f51342dc3d8c157737167e] | committer: Michael Niedermayer
mov: Fix grayscale Cinepak in mov
Fixes Ticket165
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cadbe4ecd19a8bba01f51342dc3d8c157737167e
---
libavformat/mov.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5464b78..70cd776 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);
More information about the ffmpeg-cvslog
mailing list