From 34b70a1c7781ea09ae26a89e52097fc136909280 Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 5 Jan 2003 13:32:57 +0000 Subject: sanity check git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8795 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/sub.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libvo') diff --git a/libvo/sub.c b/libvo/sub.c index 6bfb0d7d5c..8f265e5461 100644 --- a/libvo/sub.c +++ b/libvo/sub.c @@ -208,7 +208,15 @@ inline static void vo_update_text_progbar(mp_osd_obj_t* obj,int dxs,int dys){ } 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; -- cgit v1.2.3