summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-13 20:09:05 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-13 20:09:05 +0000
commit1c0928d65e916278177a068bbcbb3a3d0ac0f943 (patch)
tree7f8efc243c75675f5467c0935ea657eb3ec26a0a
parent43bfa1b6567c3f5c4ba562c9229e2dece41dedff (diff)
downloadmpv-1c0928d65e916278177a068bbcbb3a3d0ac0f943.tar.bz2
mpv-1c0928d65e916278177a068bbcbb3a3d0ac0f943.tar.xz
Fix OSD handling, DVD subtitles work now. Will be a bit slower though.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15720 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_gl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 35225e09b1..049c9e4f12 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -152,8 +152,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
glFindFormat(format, &image_bytes, &gl_texfmt, &gl_format, &gl_type);
image_bytes = (image_bytes + 7) / 8;
- if (use_osd)
- sub_bg_alpha = 255; // We need alpha = 255 for invisible part of the OSD
int_pause = 0;
panscan_init();
@@ -270,6 +268,7 @@ static void create_osd_texture(int x0, int y0, int w, int h,
unsigned char *src, unsigned char *srca,
int stride)
{
+ int i;
// initialize to 8 to avoid special-casing on alignment
int sx = 8, sy = 8;
GLfloat xcov, ycov;
@@ -306,8 +305,10 @@ static void create_osd_texture(int x0, int y0, int w, int h,
GL_LUMINANCE, GL_UNSIGNED_BYTE, clearTexture);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, scale_type);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, scale_type);
+ for (i = 0; i < h * stride; i++)
+ clearTexture[i] = ~(-srca[i]);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_ALPHA,
- GL_UNSIGNED_BYTE, srca);
+ GL_UNSIGNED_BYTE, clearTexture);
#endif
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glAdjustAlignment(image_width * image_bytes);