mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 05:41:16 +00:00
better fix of vo_aa font segfault
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9177 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f31e7522e2
commit
142ebc5c38
@ -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);
|
||||
|
@ -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++){
|
||||
|
Loading…
Reference in New Issue
Block a user