summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-07-23 01:55:13 +0300
committerUoti Urpala <uau@mplayer2.org>2011-07-23 01:55:13 +0300
commit91d6bca6950d707915f1301c2a614cc7d9a0fad0 (patch)
tree65885dfe97a622b6f2d2e83c0c3da4e4d6a20b51 /sub
parentd6890a7b5390f1f227132be96c0c1ba998b1cdf3 (diff)
downloadmpv-91d6bca6950d707915f1301c2a614cc7d9a0fad0.tar.bz2
mpv-91d6bca6950d707915f1301c2a614cc7d9a0fad0.tar.xz
cleanup: subs: remove global ass_library variable
Diffstat (limited to 'sub')
-rw-r--r--sub/ass_mp.c1
-rw-r--r--sub/ass_mp.h1
-rw-r--r--sub/sd_ass.c4
-rw-r--r--sub/sub.h1
4 files changed, 3 insertions, 4 deletions
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 <ass/ass.h>
#include <ass/ass_types.h>
-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;