From 99d9e56e2760579fa17fd1a6673574db383ede42 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 23 Jul 2011 05:13:25 +0300 Subject: 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. --- cfg-mplayer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cfg-mplayer.h') diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 93fb58f480..b767d1c0f1 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -710,7 +710,7 @@ const m_option_t common_opts[] = { {"noass-use-margins", &ass_use_margins, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"embeddedfonts", &use_embedded_fonts, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noembeddedfonts", &use_embedded_fonts, CONF_TYPE_FLAG, 0, 1, 0, NULL}, - {"ass-force-style", &ass_force_style_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, + OPT_STRINGLIST("ass-force-style", ass_force_style_list, 0), {"ass-color", &ass_color, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"ass-border-color", &ass_border_color, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"ass-styles", &ass_styles_file, CONF_TYPE_STRING, 0, 0, 0, NULL}, -- cgit v1.2.3