summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-30 19:58:43 +0000
committerhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-30 19:58:43 +0000
commit142ebc5c38c061d256270125dd3b3c4e18b3ffec (patch)
tree0bd73c290c36c615e0820b3d52f4eb8b33081f17 /libvo
parentf31e7522e28b8ff02fef5dd5d8e24c9b00c19613 (diff)
downloadmpv-142ebc5c38c061d256270125dd3b3c4e18b3ffec.tar.bz2
mpv-142ebc5c38c061d256270125dd3b3c4e18b3ffec.tar.xz
better fix of vo_aa font segfault
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9177 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/font_load_ft.c2
-rw-r--r--libvo/vo_aa.c4
2 files changed, 5 insertions, 1 deletions
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++){