Browse Source

Colours except background should not be transparent

Originally committed as revision 9940 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Reimar Döffinger 18 years ago
parent
commit
3143c78716
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/xsubdec.c

+ 3
- 0
libavcodec/xsubdec.c View File

@@ -74,6 +74,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// 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);


Loading…
Cancel
Save