From f5d493d017519997ea1d5e09245a4dfa063698c7 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 8 Aug 2011 06:01:05 +0300 Subject: subs: libass: remove bad ass_set_margins() on settings reset When libass-related options were changed at runtime, the reinitilization code executed ass_set_margins() with arguments that were correct for the vf_ass case but wrong for EOSD. This could cause the subtitles to be displayed incorrectly for one frame (vf_vo would run ass_set_margins() again with the correct parameters for the next frame). The call is actually redundant for the vf_ass case too as it's currently not possible to modify the margins during playback, so fix the problem by disabling the call. --- sub/ass_mp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sub') diff --git a/sub/ass_mp.c b/sub/ass_mp.c index 94c17b83f0..312a35a4a6 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -321,7 +321,10 @@ void mp_ass_reload_options(ASS_Renderer *priv, struct MPOpts *opts, { if (!*need_reload) return; - ass_set_margins(priv, ass_top_margin, ass_bottom_margin, 0, 0); + /* This could be needed for vf_ass case if the margins were actually + * runtime configurable, but would be wrong with EOSD: + * ass_set_margins(priv, ass_top_margin, ass_bottom_margin, 0, 0); + */ ass_set_use_margins(priv, ass_use_margins); ass_set_font_scale(priv, ass_font_scale); *need_reload = false; -- cgit v1.2.3