changeset 5489:dc54869af30b libavcodec

Colours except background should not be transparent
author reimar
date Sun, 05 Aug 2007 12:11:24 +0000
parents 0f736b1402ca
children 12d77ed34985
files xsubdec.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/xsubdec.c	Sun Aug 05 12:11:22 2007 +0000
+++ b/xsubdec.c	Sun Aug 05 12:11:24 2007 +0000
@@ -74,6 +74,9 @@
     // read palette
     for (i = 0; i < sub->rects[0].nb_colors; i++)
         sub->rects[0].rgba_palette[i] = bytestream_get_be24(&buf);
+    // make all except background (first entry) non-transparent
+    for (i = 1; i < sub->rects[0].nb_colors; i++)
+        sub->rects[0].rgba_palette[i] |= 0xff000000;
 
     // process RLE-compressed data
     rlelen = FFMIN(rlelen, buf_end - buf);