[MPlayer-cvslog] CVS: main/libvo vo_gl.c,1.70,1.71

Reimar Döffinger CVS syncmail at mplayerhq.hu
Mon Jun 13 22:09:07 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv8800

Modified Files:
	vo_gl.c 
Log Message:
Fix OSD handling, DVD subtitles work now. Will be a bit slower though.


Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- vo_gl.c	30 May 2005 08:45:21 -0000	1.70
+++ vo_gl.c	13 Jun 2005 20:09:05 -0000	1.71
@@ -152,8 +152,6 @@
 	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 @@
                                  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 @@
                  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);




More information about the MPlayer-cvslog mailing list