summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-08-08 06:01:05 +0300
committerUoti Urpala <uau@mplayer2.org>2011-08-08 06:01:05 +0300
commitf5d493d017519997ea1d5e09245a4dfa063698c7 (patch)
tree1f0cc9e7648bc2c0d152e3d2b3df02ca89261165 /sub
parent9920d6465068cdef068eddba4cf51e75d89b65ba (diff)
downloadmpv-f5d493d017519997ea1d5e09245a4dfa063698c7.tar.bz2
mpv-f5d493d017519997ea1d5e09245a4dfa063698c7.tar.xz
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.
Diffstat (limited to 'sub')
-rw-r--r--sub/ass_mp.c5
1 files changed, 4 insertions, 1 deletions
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;