From ba1e0116859530aa9f683eccb9ca765d9c8cf8dc Mon Sep 17 00:00:00 2001 From: pl Date: Tue, 20 Nov 2001 21:45:07 +0000 Subject: subtitles looked bad here (inverted colors sometimes) looked like values wrapped around the byte (not sure of the side effects but subtitles look good now) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3039 b3059339-0415-0410-9bf9-f77b7e298cf2 --- spudec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'spudec.c') diff --git a/spudec.c b/spudec.c index f455e9ea01..d55ce28fa9 100644 --- a/spudec.c +++ b/spudec.c @@ -153,7 +153,11 @@ static void spudec_process_data(spudec_handle_t *this) len = this->width - x; /* FIXME have to use palette and alpha map*/ memset(this->image + y * this->width + x, cmap[color], len); - memset(this->aimage + y * this->width + x, alpha[color], len); + if (alpha[color] < cmap[color]) { + memset(this->aimage + y * this->width + x, 1, len); + } else { + memset(this->aimage + y * this->width + x, alpha[color] - cmap[color], len); + } x += len; if (x >= this->width) { next_line(this); -- cgit v1.2.3