[Mplayer-cvslog] CVS: main/libvo vo_aa.c,1.36,1.37 font_load_ft.c,1.8,1.9

Jindrich Makovicka CVS henry at mplayerhq.hu
Thu Jan 30 20:59:04 CET 2003


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

Modified Files:
	vo_aa.c font_load_ft.c 
Log Message:
better fix of vo_aa font segfault

Index: vo_aa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_aa.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- vo_aa.c	12 Nov 2002 01:56:42 -0000	1.36
+++ vo_aa.c	30 Jan 2003 19:58:43 -0000	1.37
@@ -254,7 +254,9 @@
       vo_font=malloc(sizeof(font_desc_t));//if(!desc) return NULL;
       memset(vo_font,0,sizeof(font_desc_t));
       vo_font->pic_a[0]=malloc(sizeof(raw_file));
+      memset(vo_font->pic_a[0],0,sizeof(raw_file));
       vo_font->pic_b[0]=malloc(sizeof(raw_file));
+      memset(vo_font->pic_b[0],0,sizeof(raw_file));
 
 #ifdef HAVE_FREETYPE
       vo_font->dynamic = 0;
@@ -264,7 +266,9 @@
       vo_font->charspace=0;
       vo_font->height=1;
       vo_font->pic_a[0]->bmp=malloc(255);
+      vo_font->pic_a[0]->pal=NULL;
       vo_font->pic_b[0]->bmp=malloc(255);
+      vo_font->pic_b[0]->pal=NULL;
       vo_font->pic_a[0]->w=1;
       vo_font->pic_a[0]->h=1;
       for (i=0; i<255; i++){

Index: font_load_ft.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load_ft.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- font_load_ft.c	30 Jan 2003 18:43:08 -0000	1.8
+++ font_load_ft.c	30 Jan 2003 19:58:43 -0000	1.9
@@ -867,7 +867,7 @@
     
     if (!desc) return;
 
-    if (!desc->dynamic) return; // some vo_aa crap, better leaking than crashing
+//    if (!desc->dynamic) return; // some vo_aa crap, better leaking than crashing
 
     if (desc->name) free(desc->name);
     if (desc->fpath) free(desc->fpath);



More information about the MPlayer-cvslog mailing list