summaryrefslogtreecommitdiffstats
path: root/libvo/vo_aa.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-17 10:18:27 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-17 10:18:27 +0000
commit883fdaf97ab888fba3ba98dbcaa41fd29042f460 (patch)
treed320f0527fec36bc41bfb1b5465d7f329e093524 /libvo/vo_aa.c
parent623bf09452e73a8937452ec384b159e8d159ed3f (diff)
downloadmpv-883fdaf97ab888fba3ba98dbcaa41fd29042f460.tar.bz2
mpv-883fdaf97ab888fba3ba98dbcaa41fd29042f460.tar.xz
vo_font SEGFAULT fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1573 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_aa.c')
-rw-r--r--libvo/vo_aa.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index 697a1b0872..b58465b166 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -300,19 +300,24 @@ init(uint32_t width, uint32_t height, uint32_t d_width,
#ifdef USE_OSD
/* now init out own 'font' (to use vo_draw_text_sub without edit them) */
+ 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));
+ vo_font->pic_b[0]=malloc(sizeof(raw_file));
+
vo_font->spacewidth=1;
vo_font->charspace=0;
vo_font->height=1;
- vo_font->pic_a[1]->bmp=malloc(255);
- vo_font->pic_b[1]->bmp=malloc(255);
- vo_font->pic_a[1]->w=1;
- vo_font->pic_a[1]->h=1;
+ vo_font->pic_a[0]->bmp=malloc(255);
+ vo_font->pic_b[0]->bmp=malloc(255);
+ vo_font->pic_a[0]->w=1;
+ vo_font->pic_a[0]->h=1;
for (i=1; i<256; i++){
vo_font->width[i]=1;
- vo_font->font[i]=1;
+ vo_font->font[i]=0;
vo_font->start[i]=i;
- vo_font->pic_a[1]->bmp[i]=i;
- vo_font->pic_b[1]->bmp[i]=i;
+ vo_font->pic_a[0]->bmp[i]=i;
+ vo_font->pic_b[0]->bmp[i]=i;
};
#endif
/* say hello */