From 91d6bca6950d707915f1301c2a614cc7d9a0fad0 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 23 Jul 2011 01:55:13 +0300 Subject: cleanup: subs: remove global ass_library variable --- sub/ass_mp.c | 1 - sub/ass_mp.h | 1 - sub/sd_ass.c | 4 ++-- sub/sub.h | 1 + 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sub') diff --git a/sub/ass_mp.c b/sub/ass_mp.c index e1b0b07853..d39781ef9d 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -41,7 +41,6 @@ #endif // libass-related command line options -ASS_Library *ass_library; float ass_font_scale = 1.; float ass_line_spacing = 0.; int ass_top_margin = 0; diff --git a/sub/ass_mp.h b/sub/ass_mp.h index 965b063403..33ee90c18f 100644 --- a/sub/ass_mp.h +++ b/sub/ass_mp.h @@ -31,7 +31,6 @@ #include #include -extern ASS_Library *ass_library; extern float ass_font_scale; extern float ass_line_spacing; extern int ass_top_margin; diff --git a/sub/sd_ass.c b/sub/sd_ass.c index ba5710611e..d7556ca203 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -52,12 +52,12 @@ static void init(struct sh_sub *sh, struct osd_state *osd) ctx = talloc_zero(NULL, struct sd_ass_priv); sh->context = ctx; if (sh->type == 'a') { - ctx->ass_track = ass_new_track(ass_library); + ctx->ass_track = ass_new_track(osd->ass_library); if (sh->extradata) ass_process_codec_private(ctx->ass_track, sh->extradata, sh->extradata_len); } else - ctx->ass_track = mp_ass_default_track(ass_library); + ctx->ass_track = mp_ass_default_track(osd->ass_library); } assert(osd->ass_track == NULL); diff --git a/sub/sub.h b/sub/sub.h index 8309613ea6..90a742f8e7 100644 --- a/sub/sub.h +++ b/sub/sub.h @@ -69,6 +69,7 @@ typedef struct mp_osd_obj_s { } mp_osd_obj_t; struct osd_state { + struct ass_library *ass_library; unsigned char osd_text[128]; struct font_desc *sub_font; struct ass_track *ass_track; -- cgit v1.2.3