From 2125e49422137fa3164b37f7d64e2df68f07da9b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 15 Nov 2014 19:43:43 +0100 Subject: sub: workaround braindead libass API libass won't use embedded fonts, unless ass_set_fonts() (called by mp_ass_configure_fonts()) is called. However, we call this function when the ASS_Renderer is initialized, which is long before the .ass file is actually loaded. (I'm not sure why it tries to keep 1 ASS_Renderer, but it always did this.) Fix by calling mp_ass_configure_fonts() after loading them. This also means this function will be called multiple times - hopefully this is harmless (it will reinit fontconfig every time, though). While we're at it, also initialize the ASS_Renderer lazily. Fixes #1244. --- player/loadfile.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index 6e556a672d..b27ba94860 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1079,8 +1079,6 @@ goto_reopen_demuxer: ; "Displaying attached picture. Use --no-audio-display to prevent this.\n"); } - init_sub_renderer(mpctx); - #if HAVE_ENCODING if (mpctx->encode_lavc_ctx && mpctx->current_track[0][STREAM_VIDEO]) encode_lavc_expect_stream(mpctx->encode_lavc_ctx, AVMEDIA_TYPE_VIDEO); -- cgit v1.2.3