summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-06-24 08:29:36 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-06-24 08:29:36 +0300
commit0e85dc0f3272a3b8eec7cb4c8010c233c725ce73 (patch)
treee9f41549032311e666e9b48ee90143c46797d4a7 /mplayer.c
parentdd8938650041e22f77e6526281d0dae4727c4160 (diff)
downloadmpv-0e85dc0f3272a3b8eec7cb4c8010c233c725ce73.tar.bz2
mpv-0e85dc0f3272a3b8eec7cb4c8010c233c725ce73.tar.xz
Move global sub_font to OSD struct
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c12
1 files changed, 6 insertions, 6 deletions
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