mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
9920d64650
commit
f5d493d017
|
@ -321,7 +321,10 @@ void mp_ass_reload_options(ASS_Renderer *priv, struct MPOpts *opts,
|
||||||
{
|
{
|
||||||
if (!*need_reload)
|
if (!*need_reload)
|
||||||
return;
|
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_use_margins(priv, ass_use_margins);
|
||||||
ass_set_font_scale(priv, ass_font_scale);
|
ass_set_font_scale(priv, ass_font_scale);
|
||||||
*need_reload = false;
|
*need_reload = false;
|
||||||
|
|
Loading…
Reference in New Issue