[Mplayer-cvslog] CVS: main/libvo sub.c,1.66,1.67

Jindrich Makovicka CVS henry at mplayerhq.hu
Sun Jan 5 14:33:00 CET 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv13094

Modified Files:
	sub.c 
Log Message:
sanity check

Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- sub.c	29 Dec 2002 14:59:23 -0000	1.66
+++ sub.c	5 Jan 2003 13:32:57 -0000	1.67
@@ -208,7 +208,15 @@
     }
 
     alloc_buf(obj);
-
+    
+    {
+	int minw = vo_font->width[OSD_PB_START]+vo_font->width[OSD_PB_END]+vo_font->width[OSD_PB_0];
+	if (vo_osd_progbar_type>0 && vo_font->font[vo_osd_progbar_type]>=0){
+	    minw += vo_font->width[vo_osd_progbar_type]+vo_font->charspace+vo_font->spacewidth;
+	}
+	if (obj->bbox.x2 - obj->bbox.x1 < minw) return; // space too small, don't render anything
+    }
+    
     // render it:
     {	unsigned char *s;
    	unsigned char *sa;



More information about the MPlayer-cvslog mailing list