summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-07-23 05:13:25 +0300
committerUoti Urpala <uau@mplayer2.org>2011-07-23 05:35:26 +0300
commit99d9e56e2760579fa17fd1a6673574db383ede42 (patch)
tree5bb4d8aa31fafed7b436438f8b2fb89a5053facd /sub
parent91d6bca6950d707915f1301c2a614cc7d9a0fad0 (diff)
downloadmpv-99d9e56e2760579fa17fd1a6673574db383ede42.tar.bz2
mpv-99d9e56e2760579fa17fd1a6673574db383ede42.tar.xz
subs: fix per-file --ass-force-style
The --ass-force-style option was only applied when the main libass library handle was created. Thus any per-file option changes later had no effect. Do the ass_set_style_overrides() call in per-file initialization instead so that possible changes will be applied. Also move the option variable to the option struct. Current libass will crash (usually) if you set style overrides to a nonempty value, then an empty one. It'll be easier to trigger this bug after this commit, but the problem is not on mplayer2 side. The fix is trivial so hopefully there will be a fixed libass soon.
Diffstat (limited to 'sub')
-rw-r--r--sub/ass_mp.c2
-rw-r--r--sub/ass_mp.h1
2 files changed, 0 insertions, 3 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index d39781ef9d..9a7b89a1ed 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -46,7 +46,6 @@ float ass_line_spacing = 0.;
int ass_top_margin = 0;
int ass_bottom_margin = 0;
int use_embedded_fonts = 1;
-char **ass_force_style_list = NULL;
int ass_use_margins = 0;
char *ass_color = NULL;
char *ass_border_color = NULL;
@@ -313,7 +312,6 @@ ASS_Library *mp_ass_init(void)
ass_set_message_cb(priv, message_callback, NULL);
ass_set_fonts_dir(priv, path);
ass_set_extract_fonts(priv, use_embedded_fonts);
- ass_set_style_overrides(priv, ass_force_style_list);
free(path);
return priv;
}
diff --git a/sub/ass_mp.h b/sub/ass_mp.h
index 33ee90c18f..0e60b71103 100644
--- a/sub/ass_mp.h
+++ b/sub/ass_mp.h
@@ -36,7 +36,6 @@ extern float ass_line_spacing;
extern int ass_top_margin;
extern int ass_bottom_margin;
extern int use_embedded_fonts;
-extern char **ass_force_style_list;
extern int ass_use_margins;
extern char *ass_color;
extern char *ass_border_color;