From 7484ae8e2ee5327400358e7c7cb974d84543aef6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 7 Aug 2012 02:12:15 +0200 Subject: osd_libass: allocate separate ASS_Library for OSD osd_libass.c used the same ASS_Library object as the player core. This caused a problem: when playing a new file, all fonts loaded by the ASS_Library object were unloaded, including the OSD font. Parts of the OSD would stop being rendered correctly. Solve this by creating a separate ASS_Library, with its own set of fonts. --- sub/sub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sub/sub.c') diff --git a/sub/sub.c b/sub/sub.c index f88e9869ee..056d03d1e5 100644 --- a/sub/sub.c +++ b/sub/sub.c @@ -36,6 +36,7 @@ #include "mp_msg.h" #include "libvo/video_out.h" #include "sub.h" +#include "sub/ass_mp.h" #include "spudec.h" @@ -303,12 +304,11 @@ int osd_update(struct osd_state *osd, int dxs, int dys) return osd_update_ext(osd, dxs, dys, 0, 0, 0, 0, dxs, dys); } -struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib) +struct osd_state *osd_create(struct MPOpts *opts) { struct osd_state *osd = talloc_zero(NULL, struct osd_state); *osd = (struct osd_state){ .opts = opts, - .ass_library = asslib, }; if(!draw_alpha_init_flag){ draw_alpha_init_flag=1; -- cgit v1.2.3