mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 04:45:33 +00:00
OSD alpha conversion index out of range
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16397 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
df82620ed8
commit
3561e3a980
@ -331,7 +331,7 @@ static void create_osd_texture(int x0, int y0, int w, int h,
|
|||||||
char *tmp = (char *)malloc(stride * h);
|
char *tmp = (char *)malloc(stride * h);
|
||||||
// convert alpha from weird MPlayer scale.
|
// convert alpha from weird MPlayer scale.
|
||||||
// in-place is not possible since it is reused for future OSDs
|
// in-place is not possible since it is reused for future OSDs
|
||||||
for (i = h * stride; i; i--)
|
for (i = h * stride - 1; i; i--)
|
||||||
tmp[i] = srca[i] - 1;
|
tmp[i] = srca[i] - 1;
|
||||||
glUploadTex(gl_target, GL_ALPHA, GL_UNSIGNED_BYTE, tmp, stride,
|
glUploadTex(gl_target, GL_ALPHA, GL_UNSIGNED_BYTE, tmp, stride,
|
||||||
0, 0, w, h, 0);
|
0, 0, w, h, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user