summaryrefslogtreecommitdiffstats
path: root/sub/ass_mp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/ass_mp.c')
-rw-r--r--sub/ass_mp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index 5ae85c0d06..44b59e34d5 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -43,9 +43,11 @@ void mp_ass_set_style(ASS_Style *style, double res_y,
const struct osd_style_opts *opts)
{
if (opts->font) {
- free(style->FontName);
- style->FontName = strdup(opts->font);
- style->treat_fontname_as_pattern = 1;
+ if (!style->FontName || strcmp(style->FontName, opts->font) != 0) {
+ free(style->FontName);
+ style->FontName = strdup(opts->font);
+ style->treat_fontname_as_pattern = 1;
+ }
}
// libass_font_size = FontSize * (window_height / res_y)