diff options
author | wm4 <wm4@nowhere> | 2014-11-15 19:43:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-15 19:43:43 +0100 |
commit | 2125e49422137fa3164b37f7d64e2df68f07da9b (patch) | |
tree | e8b58f58e0c32a834ce1b959dd89bbc97a69292d /player/loadfile.c | |
parent | a6694d27889b4b65ab6d05641396724ae9696f77 (diff) | |
download | mpv-2125e49422137fa3164b37f7d64e2df68f07da9b.tar.bz2 mpv-2125e49422137fa3164b37f7d64e2df68f07da9b.tar.xz |
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.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r-- | player/loadfile.c | 2 |
1 files changed, 0 insertions, 2 deletions
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); |