From 0e85dc0f3272a3b8eec7cb4c8010c233c725ce73 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 24 Jun 2008 08:29:36 +0300 Subject: Move global sub_font to OSD struct --- mplayer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 45f1564fb0..6afe73f3fe 100644 --- a/mplayer.c +++ b/mplayer.c @@ -670,8 +670,8 @@ void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){ #ifdef HAVE_FREETYPE current_module="uninit_font"; - if (sub_font && sub_font != vo_font) free_font_desc(sub_font); - sub_font = NULL; + if (mpctx->osd->sub_font && mpctx->osd->sub_font != vo_font) free_font_desc(mpctx->osd->sub_font); + mpctx->osd->sub_font = NULL; if (vo_font) free_font_desc(vo_font); vo_font = NULL; done_freetype(); @@ -2804,6 +2804,8 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ //------ load global data first ------ + mpctx->osd = osd_create(); + // check font #ifdef HAVE_FREETYPE init_freetype(); @@ -2825,16 +2827,14 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1); } if (sub_font_name) - sub_font = read_font_desc(sub_font_name, font_factor, verbose>1); + mpctx->osd->sub_font = read_font_desc(sub_font_name, font_factor, verbose>1); else - sub_font = vo_font; + mpctx->osd->sub_font = vo_font; #endif #ifdef HAVE_FONTCONFIG } #endif - mpctx->osd = osd_create(); - #ifdef USE_ASS ass_library = ass_init(); #endif -- cgit v1.2.3