changeset 28941:a038ab949e7e

Fix uninitialized memory access in ass_fontconfig. This fixes hangups with plaintext subtitles happening when the first subtitle is about to be displayed.
author eugeni
date Mon, 16 Mar 2009 19:26:19 +0000
parents 7406e7f30d4e
children 39006a122466
files libass/ass_fontconfig.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_fontconfig.c	Mon Mar 16 17:12:29 2009 +0000
+++ b/libass/ass_fontconfig.c	Mon Mar 16 19:26:19 2009 +0000
@@ -160,11 +160,13 @@
 		goto error;
 
 #if (FC_VERSION >= 20297)
+	if (!treat_family_as_pattern) {
 	// Remove all extra family names from original pattern.
 	// After this, FcFontRenderPrepare will select the most relevant family
 	// name in case there are more than one of them.
 	for (; family_cnt > 1; --family_cnt)
 		FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
+	}
 #endif
 
 	rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]);