# HG changeset patch # User reimar # Date 1164801436 0 # Node ID d81ffbf9615f549f4b31bc49a13a1d3902d80ffa # Parent 8618755f2c0604cb5312cb3f59ee9767f5cb2053 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. diff -r 8618755f2c06 -r d81ffbf9615f libvo/sub.c --- a/libvo/sub.c Wed Nov 29 11:07:30 2006 +0000 +++ b/libvo/sub.c Wed Nov 29 11:57:16 2006 +0000 @@ -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; }