# HG changeset patch # User eugeni # Date 1237231579 0 # Node ID a038ab949e7e4bef2b7449e22f2ba1268308241c # Parent 7406e7f30d4e90f0ffd6cb0fe4b03e6ca847da3b Fix uninitialized memory access in ass_fontconfig. This fixes hangups with plaintext subtitles happening when the first subtitle is about to be displayed. diff -r 7406e7f30d4e -r a038ab949e7e libass/ass_fontconfig.c --- 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]);