[MPlayer-cvslog] r21380 - trunk/libvo/sub.c

reimar subversion at mplayerhq.hu
Wed Nov 29 12:57:16 CET 2006


Author: reimar
Date: Wed Nov 29 12:57:16 2006
New Revision: 21380

Modified:
   trunk/libvo/sub.c

Log:
EMISSINGBRAIN: No, OSD objects of size 0 sure are _not_ visible.
Fixes massive slowdown after adding dvdnav highlight support, at least
with -vo xvmc, potentially others too.


Modified: trunk/libvo/sub.c
==============================================================================
--- trunk/libvo/sub.c	(original)
+++ trunk/libvo/sub.c	Wed Nov 29 12:57:16 2006
@@ -221,7 +221,9 @@
   len = obj->stride * (obj->bbox.y2 - obj->bbox.y1);
   memset (obj->bitmap_buffer, OSD_NAV_BOX_ALPHA, len);
   memset (obj->alpha_buffer, OSD_NAV_BOX_ALPHA, len);
-  obj->flags |= OSDFLAG_BBOX | OSDFLAG_VISIBLE | OSDFLAG_CHANGED;
+  obj->flags |= OSDFLAG_BBOX | OSDFLAG_CHANGED;
+  if (obj->bbox.y2 > obj->bbox.y1 && obj->bbox.x2 > obj->bbox.x1)
+    obj->flags |= OSDFLAG_VISIBLE;
 }
 #endif
 
@@ -1003,7 +1005,9 @@
     while(obj){
 	if(obj->flags&OSDFLAG_VISIBLE){
 	    if(	(obj->bbox.x1<=x2 && obj->bbox.x2>=x1) &&
-		(obj->bbox.y1<=y2 && obj->bbox.y2>=y1) ) return 1;
+		(obj->bbox.y1<=y2 && obj->bbox.y2>=y1) &&
+		obj->bbox.y2 > obj->bbox.y1 && obj->bbox.x1 > obj->bbox.x2
+		) return 1;
 	}
 	obj=obj->next;
     }



More information about the MPlayer-cvslog mailing list