[FFmpeg-cvslog] r9940 - trunk/libavcodec/xsubdec.c

reimar subversion
Sun Aug 5 14:11:24 CEST 2007


Author: reimar
Date: Sun Aug  5 14:11:24 2007
New Revision: 9940

Log:
Colours except background should not be transparent


Modified:
   trunk/libavcodec/xsubdec.c

Modified: trunk/libavcodec/xsubdec.c
==============================================================================
--- trunk/libavcodec/xsubdec.c	(original)
+++ trunk/libavcodec/xsubdec.c	Sun Aug  5 14:11:24 2007
@@ -74,6 +74,9 @@ static int decode_frame(AVCodecContext *
     // 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);




More information about the ffmpeg-cvslog mailing list