diff options
author | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-05 13:32:57 +0000 |
---|---|---|
committer | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-05 13:32:57 +0000 |
commit | 34b70a1c7781ea09ae26a89e52097fc136909280 (patch) | |
tree | 3386b7e3893fb6db8dce746ad9c536e13a9d60e9 /libvo/sub.c | |
parent | 2947415dce872acaa037de1bb3f9d57bb538a831 (diff) | |
download | mpv-34b70a1c7781ea09ae26a89e52097fc136909280.tar.bz2 mpv-34b70a1c7781ea09ae26a89e52097fc136909280.tar.xz |
sanity check
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8795 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/sub.c')
-rw-r--r-- | libvo/sub.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; |