diff options
author | pl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-20 21:45:07 +0000 |
---|---|---|
committer | pl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-20 21:45:07 +0000 |
commit | ba1e0116859530aa9f683eccb9ca765d9c8cf8dc (patch) | |
tree | 298146c64382ca93e10699447d0c6780c800a030 /spudec.c | |
parent | 6220f955b33cfca403969259ef420827262f79c4 (diff) | |
download | mpv-ba1e0116859530aa9f683eccb9ca765d9c8cf8dc.tar.bz2 mpv-ba1e0116859530aa9f683eccb9ca765d9c8cf8dc.tar.xz |
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
Diffstat (limited to 'spudec.c')
-rw-r--r-- | spudec.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |