changeset 1524:1c8f80aeecdb

segfault fixed
author arpi
date Wed, 15 Aug 2001 00:35:35 +0000
parents 8409ad08ae31
children 9525bff8bea8
files libvo/sub.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/sub.c	Tue Aug 14 23:47:48 2001 +0000
+++ b/libvo/sub.c	Wed Aug 15 00:35:35 2001 +0000
@@ -137,7 +137,7 @@
       memdxs=dxs;
       memdys=dys;
       
-      memy=dys-vo_font->height/4;
+      memy=dys-vo_font->height/2;
       
       // too long lines divide into smaller ones
       i=k=lines=0; l=vo_sub->lines;
@@ -195,12 +195,14 @@
    k=i=0; l=lines;
    while (l--){
        x = xtbl[i++];
+       if(y<dys)
        while ((c=utbl[k++])){
 	     if (x>=0 && x+vo_font->width[c]<=dxs)
 		if ((font=vo_font->font[c])>=0)
 	           draw_alpha(x,y,
 			      vo_font->width[c],
-			      vo_font->pic_a[font]->h,
+//			      vo_font->pic_a[font]->h,
+			      (y+vo_font->pic_a[font]->h<=dys)?vo_font->pic_a[font]->h:dys-y,
 			      vo_font->pic_b[font]->bmp+vo_font->start[c],
 			      vo_font->pic_a[font]->bmp+vo_font->start[c],
 			      vo_font->pic_a[font]->w);