summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-08-05 12:11:24 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-08-05 12:11:24 +0000
commit3143c78716007c84f879c95e49c482805d25a2f6 (patch)
tree64c0cb3a83d7bd70611ab735dcef352fe22d28e4 /libavcodec
parentd5049e2c6948d4d9529fb825912a907fb9077120 (diff)
downloadffmpeg-3143c78716007c84f879c95e49c482805d25a2f6.tar.gz
Colours except background should not be transparent
Originally committed as revision 9940 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/xsubdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index ad1f55ef69..134eb9ab03 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -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);