summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 775d7333c0..f0b9d311c8 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -331,8 +331,10 @@ static void create_osd_texture(int x0, int y0, int w, int h,
{
int i;
char *tmp = (char *)malloc(stride * h);
- for (i = 0; i < h * stride; i++)
- tmp[i] = ~(-srca[i]);
+ // convert alpha from weird MPlayer scale.
+ // in-place is not possible since it is reused for future OSDs
+ for (i = h * stride; i; i--)
+ tmp[i] = srca[i] - 1;
glUploadTex(gl_target, GL_ALPHA, GL_UNSIGNED_BYTE, tmp, stride,
0, 0, w, h, 0);
free(tmp);