summaryrefslogtreecommitdiffstats
path: root/sub/ass_mp.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-15 15:04:49 +0100
committerwm4 <wm4@nowhere>2013-12-15 15:04:49 +0100
commit78b5324eeefc2b8a235a8ea412283491ee009a1e (patch)
tree781e871012c9ba25010323142d39b1ea9845b292 /sub/ass_mp.c
parent319405830996b2bc73e9cdf437e389f2045adafe (diff)
downloadmpv-78b5324eeefc2b8a235a8ea412283491ee009a1e.tar.bz2
mpv-78b5324eeefc2b8a235a8ea412283491ee009a1e.tar.xz
osd: use separate ASS_Renderer for each OSD object
This simplifies things, although it is slightly less efficient (probably uses a bit more memory). This also happens to fix that the OSC dropped the libass cache on every frame.
Diffstat (limited to 'sub/ass_mp.c')
-rw-r--r--sub/ass_mp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index 72c22d54e6..5ae85c0d06 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -222,9 +222,10 @@ static void message_callback(int level, const char *format, va_list va, void *ct
ASS_Library *mp_ass_init(struct MPOpts *opts)
{
- ASS_Library *priv;
char *path = mp_find_user_config_file("fonts");
- priv = ass_library_init();
+ ASS_Library *priv = ass_library_init();
+ if (!priv)
+ abort();
ass_set_message_cb(priv, message_callback, NULL);
if (path)
ass_set_fonts_dir(priv, path);