# HG changeset patch # User henry # Date 1041773577 0 # Node ID 056fc0a8b3d243ebab1f406418f11f11979b830d # Parent 63e2ab74e0a675c839e56e3d882cf0506e066b1c sanity check diff -r 63e2ab74e0a6 -r 056fc0a8b3d2 libvo/sub.c --- a/libvo/sub.c Sun Jan 05 13:29:38 2003 +0000 +++ b/libvo/sub.c Sun Jan 05 13:32:57 2003 +0000 @@ -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;