[Mplayer-cvslog] CVS: main/libvo sub.c,1.17,1.18

Arpi of Ize arpi at mplayer.dev.hu
Wed Aug 15 02:35:38 CEST 2001


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

Modified Files:
	sub.c 
Log Message:
segfault fixed

Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- sub.c	13 Aug 2001 13:12:49 -0000	1.17
+++ sub.c	15 Aug 2001 00:35:35 -0000	1.18
@@ -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);




More information about the MPlayer-cvslog mailing list