Mercurial > mplayer.hg
changeset 9176:237b7e51521a
better fix of vo_aa font segfault
author | henry |
---|---|
date | Thu, 30 Jan 2003 19:58:43 +0000 |
parents | e11fea5663b2 |
children | 01a713dcaf23 |
files | libvo/font_load_ft.c libvo/vo_aa.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/font_load_ft.c Thu Jan 30 19:35:10 2003 +0000 +++ b/libvo/font_load_ft.c Thu Jan 30 19:58:43 2003 +0000 @@ -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);
--- a/libvo/vo_aa.c Thu Jan 30 19:35:10 2003 +0000 +++ b/libvo/vo_aa.c Thu Jan 30 19:58:43 2003 +0000 @@ -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++){