Author: al Date: Mon Apr 15 19:09:42 2019 New Revision: 38126 Log: vo_aa: Fix subtitle display Override subtitle font (stored in sub_font) too. This fixes a regression probably introduced at the time the separate subtitle font was added in 2007 (SVN r23356). All in all, the subtitle and OSD support of vo aa was a hack from the time it was added. If we choose to evolve the subtitle code in MPlayer, this hack will have to be replaced sooner or later. Modified: trunk/libvo/vo_aa.c Modified: trunk/libvo/vo_aa.c ============================================================================== --- trunk/libvo/vo_aa.c Sat Mar 9 20:18:32 2019 (r38125) +++ trunk/libvo/vo_aa.c Mon Apr 15 19:09:42 2019 (r38126) @@ -92,6 +92,7 @@ static int osdx, osdy; static int osd_text_length = 0; int aaconfigmode=1; font_desc_t* vo_font_save = NULL; +font_desc_t* sub_font_save = NULL; static struct SwsContext *sws=NULL; /* configuration */ @@ -250,7 +251,8 @@ config(uint32_t width, uint32_t height, /* now init our own 'font' */ if(!vo_font_save) vo_font_save = vo_font; if(vo_font == vo_font_save) { - vo_font=malloc(sizeof(font_desc_t));//if(!desc) return NULL; + sub_font_save = sub_font; + sub_font=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)); @@ -517,6 +519,10 @@ uninit(void) { vo_font = vo_font_save; vo_font_save = NULL; } + if(sub_font_save) { + sub_font = sub_font_save; + sub_font_save = NULL; + } aa_close(c); }
participants (1)
-
al