From 142ebc5c38c061d256270125dd3b3c4e18b3ffec Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 30 Jan 2003 19:58:43 +0000 Subject: better fix of vo_aa font segfault git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9177 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/font_load_ft.c | 2 +- libvo/vo_aa.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'libvo') diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index d56157e189..7b38382462 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -867,7 +867,7 @@ void free_font_desc(font_desc_t *desc) 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); diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c index 78c5bb2f20..e02682d00d 100644 --- a/libvo/vo_aa.c +++ b/libvo/vo_aa.c @@ -254,7 +254,9 @@ config(uint32_t width, uint32_t height, uint32_t d_width, 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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, 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++){ -- cgit v1.2.3